We know that the weight of a body is the downward force of gravity. A ball is released from a particular height in Figure 1. The ball falls under the action of gravitational force of magnitude $mg$ where $m$ is the mass of the ball. The work done by the gravitational force between the heights ${y_1}$ and ${y_2}$ is,

\[\begin{align*} W &= -mg({y_2} - {y_1})\\ {\rm{or,}}\quad W &= mg{y_1} - mg{y_2} = U_1 - U_2 = -(U_2 - U_1) = -\Delta U \tag{1} \label{1} \end{align*}\]

where $U_1$ and $U_2$ are the gravitational potential energies at height $y_1$ and $y_2$ respectively. Therefore, the gravitational potential energy $U$ at any height $y$ is $mgy$ which is the work done by the gravitational force from height $y$ to $y=0$. Notice that the initial potential energy $ U_1 = mg{y_1}$ is the total work done by the gravitational force from $y = {y_1}$ to $y = 0$ and this is similar for the final potential energy $U_2 = mg{y_2}$. So the potential energy is in fact the work done.

Note that $\Delta U$ is the final potential energy $U_2$ minus the initial potential energy $U_1$ but the work done by the gravitational force is the initial potential energy minus the final potential energy. The ball in Figure 1 falls under the action of gravity and therefore $y_1 > y_2$ and the work done by the gravitational force is positive as it should be. The Equation \eqref{1} tells us that the work done by the gravitational force is the negative of change in potential energy.