How many of you smoke while sitting in close proximity to your gas tanks? A calm day, you hold your cigarette down to your side and the next thing you know you're singing pop goes the weasel. I'd say that's certainly more dangerous to have open flames and glowing ignition sources in the same general area as the gas tank. And how many of you have your switch panels near your gas tanks. Another source of sparks. A battery does not just produce a spark at random intervals. It generally takes a loose connection or an action like connecting/disconnecting a wire from the battery to produce a spark. And a battery on it's own produces oxygen and hydrogen when it's gassing, and that's a much more volatile combination than gas fumes. Look at the number of times you hear about batteries exploding and the damage they do. So if your battery is going to produce a spark shouldn't you be worried about that as well?
My point is, it doesn't mater if they're stored near each other as either one can be dangerous by it's self if the fumes are not ventilated and an ignition source is present. The simplest solution is to prevent the fumes from building up. Looking at the pic that Thudpucker posted makes me think you don't get much better ventilation than that. I'm not suggesting everyone go out and stuff their battery and gas tank into the same small area but if it's adequately ventilated, I don't see a problem with it.
I've had a close up personal experience with an exploding battery and prefer not to repeat that. Many many years ago when I was working in a garage, I went to remove a charger from a battery. The battery was still in the car and unknown to me at the time, the chargers manual on/off switch failed and the charger did not actually turn off. When I disconnected the charge cables I gave that hydrogen it's ignition spark. Let me tell you that was loud. Luckily the bulk of the exploding force was out the sides of the battery. It vaporized every bit of acid that was in it and produced a fog that covered me. I was instantly blinded and my eyes were burning like matches had been inserted into them. I felt my way along the wall to the bathroom and opened my eyes under a running faucet and an eye wash station a few minutes later. After the burning subsided enough for me to see, I discovered I was rapidly on my way to becoming a nudist. The acid that covered me was eating the denim jeans/jacket and shirt I was wearing at a feverish pace.