Also a good time change the sacrificial anode if that is something you want to do. I also replaced my plastic drain valve with a good metal ball valve at this time.
Would be the same technique. Just instead of turning off the electricity you would turn off the gas. Set thermostat to off. Then turn off gas to water heater. To turn back on.turn on the gas to water heater.then Place control dial to pilot.then click ignition . Re light the pilot .Verify looking glass that pilot light is on or running.then turn to ON .