That simple equation you quoted has been derived from the geodesic equations. Geodesics are the equivalent of straight lines on curved manifolds, which is a mathematical object. The shape and geometry of the manifold in question, which in turn influences the shape of the geodesics, is given by the matter distribution, or more specifically the energy stress tensor. The relationship between the manifold and the energy stress tensor is described by the Einstein field equations.
We gave that manifold the name "spacetime".