Illumination of the Check Engine Light can be caused by a loose or worn gas cap.Google+
Car Problem Reports
Pontiac G5 Check Engine Light Due to Gas Cap Issue
Pontiac G5 Problem
Average Mileage: 75,600 mi (41,000 mi - 180,000 mi)
I took it into the dealer as a scan showed a pressure valveproblem and they where the only place to get the part.Lasted about 2 weeks then back where they said needed another part now up to 600.00.Go down the road and boom comes on highway driving.Goes back off in town pretty sure this pont all that was neede was cap.
Visitor, 2009 Pontiac G5, 42,000 mi
This is what the technician at the Pontiac dealer told me; that it is a common problem with G5s. He told me to reseat the gas cap, but the light does not turn off right away. In my experience, it turns off about 2-2.5 days later. However I think I will just take it to the dealer and have the replace the cap. More of a nuisance than a real problem.
Visitor, 2008 Pontiac G5, 180,000 mi
The display says check gas cap, gas cars is worn on my 08 model car!