It is a valve to cut off the water to the heater. (The outlet comes out the bottom.)
Loosen the brass hex packing nut. Packing is probably gunked up. You should be able to turn handle once the brass nut is loosened up. Once you get it freed up, tighten the nut until it quits leaking.
Carl