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= m g h
h= Vertical displacement = 0
W = m g — 0 = 0 J
Therefore, the work done by gravity on the given object is zero joule.