Imagine being inside of a closed box like an elevator. Without leaving the box there is no way to tell the difference from being in free fall towards Earth versus floating in interstellar space. Therefor, general relativity take the perspective that gravity is a fictitious force (like centrifugal force) that arises from the shape of spacetime.