I'd suspect a charging issue. Either the alternator is crapping out or the belt is loose causing the alternator to be unable to keep up therefore discharging the battery. A belt tensioner failing can cause slack in the belt. Those are my best guesses.
A gas cap issue usually drops an engine light, not a battery light.