See if the car threw a check engine light code, will likely point to the problem.

Most likely cause is the throttle body itself as its electronic or its the pedal postion sensor thats part of the gas pedal.