Either you have a pipe leaking or it could be the Anode rod leaking( the plug on top that has no pipe attached) or one of the weld seams have split open depending on if it is gas or electric it could be one of the spot welded fittings on top or the flu pipe that sticks out the top. Hope this helps.either way you need to turn of the power or gas burner and the water supply then hold open the pop off valve on the side to drain excess pressure until u can isolate and repair the leak.
In my opinion, when water comes out of the hot water heater it means there's water leakage. Find out where the water is leaking from, whether from the tank or from the pipe that gets into the shower. That way it would be easier to fix.