Volcanic gas is contained within magma. As the magma rises to the Earth's surface the gases are exsolved. Because some gases are toxic they can suffocate people. Gas escapes from fissures and vents and help to form fumaroles, solfataras and mudpots.
Emanations of gas are rarely large enough to cause loss of life. However, 142 people were killed by carbon dioxide from the Deng Plateau in Java.
Carbon dioxide is perhaps one of the most dangerous gases because it's invisible and in pure mass it kills any person or animal which inhales it within a few minutes.