I work for GE Aviation. We make avionics for civilian and military aircraft and I like to think that we are the best aviation company on the planet. I am the Reliability Group Manager, which means I supervise the work of seven reliability engineers. These talented folks are electrical engineers by education and they are darn good in what they do. My people look at electronic schematics, circuits and analyze the reliability of these systems. They are the best at what they do.
In the course of my career with GE, my coworkers have learned that I am not an electrical engineer. Rather, I was trained in chemistry and mathematics. In order to understand the chemistry I studied, I had to take a lot of physics classes. They also understand that I served as a Navigator of a destroyer, so I have an understanding of celestial navigation and celestial mechanics. Also, these aforementioned electrical engineers are very focused on, well, electrical engineering. Few of them took classes outside of the mathematics needed to take "double E" courses and they certainly did not take courses in celestial mechanics. This is where I come in...
One day at lunch, my friend Greg asked me, "Paul, do you know anything about how gravity works? Specifically, do you understand why a planet is used, sometimes, to increase the speed of a deep space probe?"
I answered, "Why yes, yes I do." I explained to Greg that the reason why gravity is sometimes used to increase the speed of a deep space probe because there is essentially a "well" that is created by the mass of a planet in space-time. NASA has used planets to increase the speed of deep space probe, and this is known as a gravity assist.
A gravity assist or slingshot maneuver around a planet changes a spacecraft's velocity relative to the star around which the planet circles, even though it preserves the spacecraft's speed relative to the planet—as it must according to the law of conservation of energy. To a first approximation, from a large distance, the spacecraft appears to have bounced off the planet.
Realistic portrayals of encounters in space require the consideration of two dimensions. In that case the same principles apply, only adding the planet's velocity requires vector addition, as shown below.

Thus, to a stationary observer measuring the velocity of the spacecraft, its velocity increases relative to the observer. NASA has used this on the Mariner, Voyager, MESSENGER and Cassini missions. I have certainly learned a lot from these electrical engineers, but is is refreshing to share a bit of the knowledge with some really bright people.