I don't think that you need to turn off the gas to the hot water heater. I believe that it is likely acceptable to leave the appliance on the 'pilot' setting.
I would obtain the manual for this device (try searching online, you will likely find it that way) or call the support number for the manufacturer.
However, what is acceptable practice is not necessarily best practice.
Personally, I would be hesitant to leave a gas appliance unattended for more than a day or two without physically disconnecting the gas (usually a 1/4 turn valve on the feed line). However, I feel comfortable lighting the pilot light myself.
Perhaps your should check with the local utility that provides your gas and see if they offer a service to visit your home and relight the pilot light upon your return? Mine does and it is free. My wife knows to contact them in the event I am unavailable because she is not comfortable at all in doing this herself.
The heater is leaking.
Therefore, it does not hold water.
Water heater electric heating elements die a short, nasty death if they are powered up in air, rather than in water. Gas water heaters will burn out the bottom if the flame comes on with no water in the heater.
You should shut off the electricity or gas BEFORE you shut off the water, or very, very shortly thereafter, both to reduce damage to the heater (which may not matter much if it's leaking in a way that means it needs to be entirely replaced) and also to reduce risk of fire when heat is applied to a water heater not full of water.
If you are in a place where your water heater might freeze you should STILL turn off the heat source (electric or gas), and then drain all the water from the tank (and consider what a bad idea it is to locate your water heater where it can freeze in the first place, but that's an opinion...)
For most repairs and any replacement you'll want to drain any remaining water (amount depending on the location of the leak) anyway, but that's easier if you wait until it's cooled down some.
Best Answer
I'd advise against turning off and on the water tank daily. For the physical tank and parts, a hot water heater turns on and off frequently during it's operation and won't suffer any damage from the switching, with the possible exception of the controls themselves. The bigger concern is large temperature swings by leaving it off for long periods of time and then reheating the water.
Turning off a hot water heater and allowing it to cool to 32 to 42 °C (90 to 108 °F) can allow pathogens to grow. See this question and answer for more details about ideal water heater temperature settings.
Turning a cold tank on, if your system has a one way "check valve" preventing back flow of water into the municipal system, can result in a large pressure increase. That dramatic swing can overload the capabilities of a small expansion tank if you have one, and cause valves to fail in your home. The failing valves will be seen as dripping fixtures, running toilets, or a leaking TPR valve on the water tank itself.
For a vacation home where the tank is turned off for several months, I wouldn't have these concerns. The tank is typically allowed to cool well between the lower limit for pathogens, and the water lines often have air in them from being drained or are being run to purge the stale water, which allows for the expansion as the water heater turns back on.