Work done by gravity depends only on the vertical displacement of the body. It does not depend upon the path of the body. Therefore, work done by gravity is given by the expression,

W = mgh

where, Vertical displacement, h = 0

Therefore, W = mg × 0 = 0

Hence, the work done by gravity on the body is zero.