The gradient of a scalar field $V$, written $\nabla V$, has the property that $dV = \nabla V \cdot\,d\bar{P}$ where $\bar{P}$ is a point in the domain of $V$ and $dV$ is the differential change produced by the differential change in the argument, $d\bar{P}$.
If we take as the definition of $\nabla V$ to be the vector field such that the above dot formula holds, then the expressions for $\nabla V$ in cylindrical & spherical coordinates become obvious.
Let’s derive the expression in spherical coordinates:
$$
d\bar{P} = (dr)\hat{r} + (r\,d\phi)\hat{\phi} + (r\sin\theta\,d\theta)\hat{\theta}
$$
You can see this by drawing a differential block in spherical coordinates and marking up the edges with differential lengths. $d\bar{P}$ will go diagonally through the differential block.
Using the definition $dV = \frac{\partial V}{\partial r}\,dr + \frac{\partial V}{\partial \theta}\,d\theta + \frac{\partial V}{\partial \phi}\,d\phi$, the obvious choice for the gradient of $V$ is
$$
\nabla V = (\frac{\partial V}{\partial r}) \hat{r} + (\frac{1}{r}\frac{\partial V}{\partial \theta})\hat{\theta} + (\frac{1}{r\sin\theta}\frac{\partial V}{\partial \phi})\hat{\phi}
$$
(in order to cancel out the coefficients in $d\bar{P}$ when dotting).

