Diagnosing and fixing a thermocouple problem
Inside the burner compartment of your gas water heater, right in front of the pilot light, is a small metal cylinder called a thermocouple. The thermocouple is a safety device that senses when the pilot light is burning. If the pilot goes out, the thermocouple signals the gas valve to remain closed until the pilot light is relit.
When thermocouples wear out, the pilot light goes out, the burner won't light, and you don’t get any hot water. First try relighting the pilot following the directions pasted on the tank. If the pilot lights but the flame goes out as soon as you release the button after holding it for 60 seconds, then the thermocouple is bad.
It's possible to replace the thermocouple without removing the burner assembly, and many repair people do this. But removing the burner assembly as we've done simplifies the job of replacing the thermocouple and allows you to vacuum out the burner compartment and clean the burner while you're at it.
Even though this job is simple, don't attempt it unless you know how to turn off the gas to the water heater and are comfortable with relighting the pilot. You'll need a few wrenches to remove the burner, possibly a screwdriver to remove the access cover, and a small brush and dishwashing liquid to test for leaks.
Thermocouples for water heaters are readily available at hardware stores and home centers. Remove the old thermocouple and measure it. Then buy the same size replacement. Parts are included to mount the thermocouple in almost any water heater.
Call a repair person if your water heater looks different from the one shown.