Suppose we consider a point dipole i.e. an ideal dipole. At the origin the potential:
$$ \phi(\mathbf r) = \frac{1}{4\pi\epsilon_0} \frac{\mathbf p\cdot\hat{\mathbf r}}{r^2}$$
is undefined due to the $1/r^2$ term in the potential, but electric field:
$$ \mathbf E = \frac{1}{4\pi\epsilon_0}\frac{3(\mathbf p\cdot\hat{\mathbf r})\hat{\mathbf r} - \mathbf p}{r^3} - \frac{1}{3\epsilon_0}\mathbf p\delta^3(\mathbf r) $$
remains well defined. How can we calculate electric field at the origin by equation $\mathbf E=-\nabla\phi$?