Suppose a body of mass m is lifted vertically upwards through a distance h. In this case, the force required to lift the body will be equal to weight of the body, mg (where m is mass and g is acceleration due to gravity), Now,
Work done in lifting a body = Weight of body x Vertical distance
W = mg ร h
= mgh
Where W = Work done, and h = Height through which the body is lifted.