I had the same problem. It was the alternator. I always replace the alternator and battery together. It could be a tired battery that over-worked your alternator and killed it. In any case, replacing them both is cheap insurance that you've covered your charging system worries for a while...
Another note: in my case, the alternator tested good and I did not get a charging system warning light. It must have been partially working, but not enough to run the car and keep the battery charged. Good luck.