Planets are not standing still. They can be used to pull the probe along.
Also important to mention, there is energy transfer going on here. Every time one of these probes performs this maneuver, the planet loses a (tiny) fraction of its kinetic energy. It's just that the planet has so much energy that even that tiny amount equates to an increase in the probe's speed.
Taken to extremes, if enough probes were accelerated using this method the planet would slow down and collapse into the Sun.
Does Al Gore know?