If gravity is not a force, then how come gravitational assists work? I have learned about general relativity and how gravity arises from spacetime curvature. And I have always been taught that gravity is not a real force in the sense that
$$\frac{dp}{dt} = 0$$
And from this, gravity does not accelerate objects while they are in freefall. They are only accelerated when they are on the ground at rest.
On the other hand, when a spacecraft needs to reach a destination more quickly, they can use planets as velocity boosters. They use a gravitational assist from the planet to accelerate them to a greater velocity.
How can this be if gravity does not accelerate objects in freefall since it is not a force? I am seeing a contradiction here and it is confusing me. What am I missing in my conceptual understanding of gravity?
 A: For $\dfrac{d}{dt}\vec P = \dfrac{d}{dt} (m\dfrac{d}{dt}\vec s)$, where $\vec s$ is the position of a gravitationally-affected body as measured by a distant observer, $t$ is the time measured by a distant observer, $\dfrac{d}{dt}\vec P \ne 0$. This is the difference between coordinate acceleration (the second derivative of position with respect to time) and proper acceleration (what a local accelerometer measures).
A: Well, gravity is a force and it isn't. What is a force anyway? It's what makes you accelerate, which is already a statement about a second-order derivative of one variable with respect to another, and now all of a sudden your coordinate system is important.
The point being made when someone says "gravity isn't a force" is that, if you express a body's location in spacetime, not space as a function of proper, not "ordinary" time along its path, gravity doesn't appear in the resulting generalization of Newton's second law in the same way as other forces do. In that coordinate system, the equation can be written as $\color{blue}{\ddot{x}^\mu}+\color{red}{\Gamma^\mu_{\nu\rho}\dot{x}^\nu\dot{x}^\rho}-\color{limegreen}{a^\mu}=0$, where the red (green) part is gravity (other forces). But this red/green distinction looks different, or disappears, if you look at things another, mathematically equivalent way. In particular:

*

*Putting on Newton's hat This is the less elegant of two options I'll mention, one that uses pre-relativistic coordinates. If you look at the body's location in space, not spacetime as a function of ordinary, not proper time, the red term looks like the green term, hence like the stuff you learned from Newton. In particular, $\frac{dp^i}{dt}\ne0$.

*Putting on Einstein's hat Even more elegantly, we don't need to leave behind the coordinates I suggested first to change our perspective. As @jawheele notes in a comment, we unlock the real power of GR if we use a covariant derivative as per the no-red formulation $\color{blue}{\dot{x}^\nu\nabla_\nu\dot{x^\mu}}-\color{limegreen}{a^\mu}=0$. This time, the equation's terms manifestly transform as a tensor, making the blue term the unique simplest coordinate-invariant notion of acceleration.

The main advantage of the $\Gamma$-based version is doing calculations we can relate back to familiar coordinates. This not only recovers Newtonian gravity in a suitable limit, it computes a correction to it.
Regarding the first bullet point above, have you ever spun on a big wheel? There's a similar perspective-changing procedure that says the dizziness you're feeling is due to something that's "not a force". You're still dizzy, though. This isn't a contradiction; they're just two different ways of deciding what counts as a force.
The good news is we don't need to "forget" GR to understand a gravity assist. How does it work? It exploits the fact that, if a planet's in the right place at the right time for you, the red term is very different from what the Sun alone would normally give you there. This has implications for the blue part even without wasting fuel on the green part. Or you can explain it without GR; your choice.
A: An intutive description, no mathematics and not totally 100% true.
Take the example of the international space station. It goes round the earth in a (more or less) circular path. Inside the station you feel no gravity. This is despite that the station is constantly on a circular path - if this was a carousel on earth you would feel a "force" outwards. You would expect things in zero gravity to move towards the "outside" of the path - but they dont.
In the Newton equations this is explained by saying that gravity is a force. Remember that an object will continue with fixed speed on a straight path unless influenced by a force.
In general relativity it instead described by saying that space-time is curved. Here as well an object will continue with fixed speed on a straight path unless influenced by a force. The difference is that a straight path in curved space time might not look straight when seen from the "outside". In this description the space station moves in a straight path through space time - there is no gravition force involved.
Regardless of which set of rules you use (added: in doing calculations), gravity as a force or curved space time, the result will be almost the same. The very slight difference will be seen only in some cases but mostly with things moving at speeds at a significant fraction of the speed of light.
So what happens in a gravity assist in the GR description is that the space craft goes in a straight line in a curved space. You might imagine it as similar to a skate boarder going into a "bowl": down, round, up. The difference is that the "bowl" moves along with the planet. Gaining speed can be done by entering the curved space behind the moving planet and "steal" a bit of the planets forward motion. There is no force involved in this, the space craft simply follow the straight line in the curved space. But as the planet moves the curved space will change over time.
