you're experiencing the pit limiter probably. Press the L key to turn it on and off.
A pit limiter exists to assist you in driving in and through the pits, because a speed limit is uphold there, so you can't go too fast in the pits, or else you will get one or more penalties.
But when you're leaving the pits, the limiter can be turned off of course.