I had the same issue with my G6 , still currently have the issues coming and going because I haven't replaced my fuel injectors yet. I bought my car with over a half tank of gas that was bad gas as it sat for 6 Months (they started it and drove it around a lock here.and there but that is it. So gas wasn't good anymore) my 2007 Pontiac G6 had 68k miles on it when the check engine light came on with the no traction light and saying service traction soon on my radio.
My scanner threw the codes P0171: System too lean and P0174 ,I changed my air filter, replaced my 02 censor (downstream) , put seafoam in the gas tank when it was almost completely empty on gas, I cleaned my throttle body with sea foam, cleaned my MAF sensor, I didn't replace my spark plugs and wires or my fuel injectors yet. But when I took my car to the shop they suggested that I clean my MAP sensor again and if that only temporary works again then to replace my MAP sensor. Guess you can purchase a plug and play one so the sensor is already in the housing so that's less riskier of messing up the sensor with your oils on your skin..... But as for my fuel injectors, as my car is less than 100k miles I would rather just look at my spark plugs to see if they are burnt or anything before replacing those and taking my fuel injectors out to clean them before having to spend the money to replace them if that isn't the issue either..
So good luck......