You need a new battery.
A vehicle gets its power requirements from the battery, not the alternator. The alternator charges the battery, but once the battery gets old it can't put out the proper voltage on demand.
When the voltage drops below a certain level, many of the sensors go into default mode. Usually it's the crankshaft position sensor, but in your case it was the gas pedal position sensor. You don't need a new sensor; you need a new battery.
Spend the extra money and get a GOOD battery. These vehicles are very demanding on batteries and cheap department-store batteries with low prices and high CCA ratings are made with very thin and weak plates. There are two schools of thought:
- buy cheap batteries and replace them routinely every three years without fail; or,
- buy a very high quality battery and hope it lasts five to six years.
I went with option 2. (AC Delco 7-year professional battery - and at one year old it tests way HIGHER on the load meter than its rated capacity!)