I had the same problem with my 2009 g6. Call the National Highway Traffic Safety Administration to report the issue as a safety defect at 1-888-327-4236. Also, you will need to contact GM at 1-800-762-2737 to report it to them as well. Keep any receipts for repairs if they issue a recall. I took mine into the shop today and they told me I had to buy a new headlight for $300. If they get enough calls they will investigate it and issue a recall.
Source: 2009 pontiac g6 owner's manual