Isn't it more about changing trajectory without spending fuel? You don't gain or lose momentum in an absolute sense because there is no absolute sense.
The size of your orbit is proportional to the energy of your spacecraft. Use manuever nodes to change the trajectory of your encounter with a planet like Eve, and notice how massively you can change the total size of your orbit (up or down, depending on the direction of the encounter). This implies a significant change in your energy during the encounter. This is from your gentle collision with the planet through its gravity field.
Think of it maybe as a skateboarder in a skateboard park where each pit is a planet, but because there is no friction, the skater does not lose speed, nor gain speed, relative to the skateboard park (solar system).
Play KSP.