This is simply the sum of the gravitational potential energy over all the points that make up the body. Each point has a mass $\rho dV$, meaning the mass density times the infinitesimal volume element, and this is multiplied by g and h, because the potential energy of a point at height h is $mgh$.
If you are asking why the potential energy is $mgh$ for a point, this can be argued using reversible elevators attached by pullies. If you want to raise a mass m by a certain amount h, you can do this by putting an equal mass on the other side of a pulley-elevator and lowering the mass by an equal amount. This process is easy--- you don't have to do work--- because the masses balance on the two sides.
So if there is a conserved energy, it must be a quantity which is unchanged when you lower a mass by a given amount, so long as you raise the same amount of mass somewhere else by the same amount. Since you can cut up big masses into small pieces, you can raise a big mass of mass 2M by H units of height by lowering two masses of size M each by H units. In all these processes, the sum of the mass times the height is conserved.
When you have different gravitational forces, like deep in the interior of the Earth, you can compensate by using a bigger mass. So it is mg which is the right unit to balance, the force, not the mass itself. This argument establishes that the potential energy is proportional to mgh, and that there is no numerical constant, that the potential energy is just equal to mgh, is just a best convention for defining the unit of energy from the unit of force.
This argument is presented in detail in Feynman's Lectures on Physics Vol 1, in an early chapter. It is essentially due to Archimedes, and it is also discussed in this answer to a related question: Why does kinetic energy increase quadratically, not linearly, with velocity?