In 1822, Thomas Seebeck discovered that a junction between two metals generated an electrical current when heated. Thermocouples are now used in a variety of heat-sensitive applications, including gas water heaters, gas dryers and gas furnaces.
Gas water heater thermocouples work by shutting off the gas supply when the pilot light has gone out. When the electrical current generated by heating two metals is disrupted, this signals the thermocouple to shut off the gas supply.
The thermocouple is located in front of the pilot light inside the burner compartment of a gas water heater. It looks like a brass tube.
Thermocouples can wear out over time. If your gas water heater pilot light won't stay lit or gas will not turn on, try cleaning the pilot to improve the heat generated by the pilot light. If this doesn't work, clean or replace the thermocouple. This is very easy and inexpensive to do. Standard thermocouples can be purchased at your local home-improvement store.
If you smell gas near your gas water heater, shut off the gas valve that should be located close to the water heater. If there is no valve for your water heater, contact a gas repairman and have one installed as soon as possible.