When is work said to be done against the force of gravity?
Work done by a body is against the applied force if the displacement is in a direction opposite to the force. In the case of gravity, if a body is lifted above the ground, work is done against gravity.
W.D.againstgravity=F.d=mg(−h)=−mgh