The energy stored in a body by virtue of its position or configuration is called potential energy.
Work done by the force of gravity on an object depends only on vertical displacement.
Vertical displacement is given by the difference in the initial and final positions / heights of the object, which is zero.
Work done by gravity is given by the expression,
W= mgh
Where, h=Vertical displacement =0
W=mg×0=0 J
Therefore, the work done by gravity on the given object is zero Joule.