We usually heat the water with gas too; but when it's heated, it sits in the boiler, which is typically bunged away in the airing cupboard, and which will have an electric heater that you can switch on when the gas is off.
Like this week, when they were replacing the gas mains in our street, or when you've forgotten to pay the gas people. "Belt and braces" as they say (though I suppose you wouldn't say that in the States, since you don't call them braces.)