Personally I would avoid generators if you can. The main issue I have with them is noise, efficiency (gas is not a very efficient source of electricity when you compare it to nuclear or hydro), and ventilation. You can get propane generators, which are large improvements over gas imo, but I still wouldn't consider them ideal long term solutions. I use a gas generator to backup aquariums when the power goes out, and it's great for the few hours it's needed a few times a year, but I gag at the thought of relying on it for consistent power (not to mention, my neighbors would probably start a petition against me if I ran it all the time, even in the muffled box I built for it).
I went over some plans once with an electrician friend to build a battery system for growing. It's 100% doable, but it's certainly more than just a car battery (I can't recall the exact number, but the plans he made called for a series of car batteries, maybe 9 or 12 of them or something. It also involved a converter to handle the AC/DC, as well as something which would have regulated the charge going to the battery, as well as the draw (this is specifically why I would have a real electrician do the plans and assembly for such a system). This is basically just a large scale DIY UPS (uninterrupted power supply). At that point, running underground conduit and powering the shed might be similar in expense and complication, and is certainly the ideal way to go, unless the idea of solar tickles the conservationist in you in which case I say go for it, the earth needs as much of our help as it can get.
There are large scale commercial battery backups, that are silent. I looked into them when I got my generator, and they look awesome, but are kinda pricey.