The gradient in spherical coordinates is given by $$\left(\partial_r f, \frac{1}{r} \partial_\theta f, \frac{1}{r \sin \phi}\partial_\phi f\right)$$
However, I get a wrong answer if I try to compute it a different way, by lowering the index of the differential using the metric in spherical coordinates. The metric in spherical coordinates is $$g = \begin{pmatrix} 1 & 0 & 0\\ 0 & r^2 & 0 \\ 0 & 0 & r^2 \sin^2 \phi \end{pmatrix}$$ So if I take $g^{-1} (df) = g^{-1} (\partial_r f \; dr + \cdots)$, then I get $$\left(\partial_r f, \frac{1}{r^2} \partial_\theta f, \frac{1}{r^2 \sin^2 \phi}\partial_\phi f\right)$$
What's going wrong here?