I used to work for a major water heater company providing tech support to plumbers and hvac techs.
Gas water heaters don't use any electricity at all except for powervent as someone else said but they aren't the most common at all they're actually so uncommon we only had about 10 people dedicated to that type but about 600 people for standard direct vent. They also cost about twice as much as direct vent.
Also the ignition system isn't powered at all even if you have the new smart gas models that actually have a computer on the front that gives off codes. The pilot powers the computer, when it goes out so does the computer.
The igniter, like I said, is self powered and sparks when you click it. We actually removed them and used them to shock each other around the office. And I still have a few that I mess with my wife and kids with and one in my go bag for fire starting.
If you have a power vent you'll have a blower looking thing on top of the water heater so it'll be fairly obvious. A generator should be able to power that though as it doesn't use much power.
Word of advice also, all gas water heaters below 75gal are sealed combustion and have a vent on the underside of the heater called a flame trap. That needs to be vacuumed out once a month otherwise the unit will shut off. That's this biggest problem everyone had so I figured is throw that out there lol.
Oh and multiple water heaters are common in large houses that have to run alot of water lines where the water might cool before it gets to the bathroom or sink. Pairing electric and gas is weird though.
Bottom line gas water heaters use no power at all what so ever even the ones with smart boxes, unless its a powervent.