This behavior can be seen a bit more clearly with nautilus gears that have constantly changing radii.
The blue one is being entirely driven by the red. It slows down because moving 2 notches at a greater diameter requires less rotation than moving 2 notches at a lesser diameter. It then speeds up because moving 3 notches at a lesser diameter requires more rotation than moving 3 at a greater diameter.
I'd love to get into watch building which likely utilizes a lot of these tricky movements.
By adjusting the distance from the center the ratio can be changed. Closer to the center on the driving cog (the left red one) will reduce rotation ratio and further away, will increase the rotation.
In this animation, the author decided that the left gear is driving the right one (while itself, presumably, being driven by a motor at constant speed or something similar).
Two identical gears start moving at the same speed. Suddenly, one gear slows down, then lurches forward at a much faster speed, and then returns to its starting speed.
While the other, identically shaped gear, spins at a constant speed the whole time.
[1] http://507movements.com/mm_038.html