Gravitational potential energy, U of a point mass m, in a gravitational field, is the work done by an external force in bringing that point mass from infinity to that point.
$U \, = \, G \frac{Mm}{r}$
Units of U is Joules (J).
Reasons for a negative sign in the equation:
- Zero (reference point) for gravitational potential energy is set to be at infinity.
- The gravitational pull is an attractive force. Since gravitational potential is defined to be work done per unit mass by an external force to bring a mass from infinity to a point, the external force has to do work against the attractive field. As external force is opposite to the direction of displacement, values of gravitational potential are negative.