In general relativity, gravity can be regarded as not a force but a consequence of a curved spacetime geometry where the source of curvature is the stress-energy tensor (representing matter, for instance).
A curve is a geodesic if the tangent vector of the curve at any point is equal to the parallel transport of the tangent vector of the base point.