RepairPal Certified shops can diagnose and repair your 2005 Pontiac G6. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.
Get the car to a GM specialist for diagnosis. There's a malfunction in the engine/transmission management system.
If you want to find a specialist, here's a directory link for you:
https://repairpal.com/pontiac-repair-in-midland-texas