Some sources say that "petrichor" is the gas that gives rain its distinctive smell:
[It's] the pleasant smell that accompanies the first rain after a dry spell.
[From petro- (rock), from Greek petros (stone) + ichor (the fluid that is
supposed to flow in the veins of the gods in Greek mythology). Coined by
researchers I.J. Bear and R.G. Thomas.]
"Petrichor, the name for the smell of rain on dry ground, is from oils
given off by vegetation, absorbed onto neighboring surfaces, and released into the air after a first rain. Matthew Bettelheim; Nature's Laboratory; Shasta Parent (Mt Shasta,
California); Jan 2002.
Other sources say that the smell comes from a bacteria in the soil:
Streptomyces bacteria, a genus belonging to the Actinomycetales order of Gram-positiveeubacteria, also called actinomycetes.
The bacteria grow in damp, warm earth before fine weather dries
out the soil, which then blows around as dust. During a dry spell,
actinomycetes produce spores that are released on contact with moisture. Rain hitting the ground kicks up an aerosol of water and soil and you breathe in fine particles of soil containing the bacteria.
H/t Paperclip