Is the socket anywhere near the water inlet? It may be for powering an external water pump.
If not that, it may be for connecting a sensor for a water level monitor, either on the fresh water barrel or the waste water container. But without more information I'd guess it's for pump power.
On the subject of the water heater - I AM NOT A COMPETENT GAS OR ELECTRIC ENGINEER - however, do you mean it won't fire on gas, electricity or both? If gas, does the caravan have a battery connected, if not the auto ignition on the heater won't work. Also for gas, you probably have an external vent with a cover somewhere - my gas water heater won't fire unless that cover is off.
If it doesn't work on electricity, have a search around the caravan for a switch or isolator that doesn't seem to do anything, turn that on and try again - you might be surprised! Also of course, check for fuses, again these can be hidden away in some surprising places.
Hope this helps, if not a more accurate description (is the problem on gas, electric or both for example) will enable someone to give you a better answer.