A gas sensor includes a gas detection chamber into which a detection gas
is introduced, a detecting element and a compensating element each
disposed in the gas detection chamber, a detection device which detects
the concentration of a detection target gas contained in the detection
gas, in accordance with a difference in electrical resistance values
between the detecting element and the compensating element, and a
dehumidifying element which is provided in the gas detection chamber, and
reversibly absorbs water contained in the detection gas and drains off
the water absorbed in the dehumidifying element.