All water heaters whether gas or electric need to have a temperature and pressure relief valve (commonly called a T&P valve) in them. These valves are required because hot water heaters are in reality, pressurized tanks. T&P valves are there to reduce pressure inside the tank, if it builds up. Simply put, when water is heated, it expands, and pressure inside the tank increases so there has to be some way to relieve the pressure—or the tank could explode. As is obvious by the name, T&P valves monitor both the internal temperature and pressure inside a water heater. If either the temperature exceeds 210° F or the pressure rises above 150 psi, the valve should open in order to relieve the pressure.Water dripping from the pipe connected to the T&P valve is a sign the valve could be failing. Even if there is no water dripping, the only way to tell if a T&P valve is working properly is to test it every couple of years.
High water pressure can also cause the T&P valve to leak or fail. Be sure to inspect your PRV to ensure that water pressure is at a safe setting and the PRV is working properly.
Testing a T&P valve is easy. The valve will be located either on the top or up high on the side of the heater and have an open ended pipe pointing downwards connected to it. Test the valve by placing a pail below the pipe, then lifting the metal lever on the T&P valve to open it. If the valve is working properly, hot water should pour out the bottom of the pipe, but stop as soon as you close the lever. If the water continues to drip or if it starts gushing out, it means the valve is defective and you should replace it. (If the water is running out full force, you can stop the flow by turning off the cold water line running into your water heater). T&P valves can't be repaired, so in reality repairing one actually means replacing it.