Do you have a drip loop in the electrical plug for your heater? And for that matter in the cords for anything electrical connected to the tank? A must to keep water from running down the lines and into the socket.
Also, saltwater is famous for producing creeping salt crust, and while water itself is actually a horrible conductor, the minerals dissolved in it that just happen to make up that crust are just dandy... so any of that getting to your socket can be.. bad.
Saltwater running down the line and making a connection with the socket could explain why you got such a shock when you touched the cord. In the water itself the current would flow through and out, but touching the source before it got to the tank and thereby a chance to flow through the water and out the stand would produce a larger effect. Just guessing there though.
I'd unplug the heater and pull that badboy out of the tank pronto. Then get a multimeter (the low end ones aren't expensive) and test for a charge. Or even may be able to use the socket testers they have.. plastic tipped things that look like pens.... or the little screwdrivers with the lightbulbs in them. Be careful about putting used items in tank water of course.
Anyway... test for current in the water. If you are still getting it, keep removing electrics.. one at a time. When the current goes away, voila.
Also, though it is always presented as uncertain at best, I've read some authors mention a connection between electrical charges in water and the development of lateral line disease, so keep an eye out.
While the chances are slim, people have actually been killed by faulty equipment and charges from their tanks.