For obtaining the gradient of a scalar field in spherical coordinates, first see how the general Eq. (23) is motivated. Then look at the derivation of the spherical scaling factors in Eq. (49). From this results Eq. (56) with the expression of the gradient in spherical polar coordinates.