Gravitational energy is the potential energy a body with mass has in relation to another massive object due to gravity. It is the potential energy associated with the gravitational field. Gravitational energy is dependent on the masses of two bodies, their distance apart, and the gravitational constant \(G\).
The general expression for gravitational potential energy arises from the law of gravity and is equal to the work done against gravity to bring a mass to a given point in space. Because of the inverse square nature of the gravity force, the force approaches zero for large distances, and it makes sense to choose the zero of gravitational potential energy at an infinite distance away.
The gravitational potential energy near a planet is then negative since gravity does positive work as the mass approaches. This negative potential is indicative of a “bound state”; once a mass is near a large body, it is trapped until something can provide enough energy to allow it to escape.