You forget that there are other forces acting than just gravity.
Sure, if only gravity acted then on the way up you would slow down and on the way down you would speed up. Like a roller-coaster cart in a circular loop.
But what if you with your car engine apply a force forwards when going up and brake when going down? What if you adjust this perfectly to counteract gravity? Then you do have a uniform (constant-speed) circular motion through the circle section.
In any horisontal circular path that takes place we don't necessarily have any default always-acting force like gravity. Your described confusion should thus only appear with vertical circular paths. Just think of driving around a roundabout. Here we must supply the force that causes the turning, which might be friction or so - here the speed is only constant if the car engine constantly applies a driving force that perfectly balances out any counteracting rolling friction, just like it does when driving straight ahead on non-curving roads.
We are taught that centripetal acceleration exists when an object is in uniform circular motion
Just a note to the terminology: centripetal acceleration exists even when the speed changes. Whenever turning takes place, the perpendicular acceleration causing the turning is called the centripetal (meaning centre-seeking) acceleration regardless of any parallel, tangential acceleration taking place simultaneously. In the specific case of constant speed, we use the word uniform to indicate that the speed doesn't change.