The fact is that, in the general case
$$
\vec{E} = -\vec{\nabla}V - \frac{\partial\vec{A}}{\partial t};
$$
(signs depend on conventions used) where $\vec{A}$ is called vector potential. You can consult for example Wikipedia.
Let us consider homogeneous Maxwell equations:
$$
\begin{cases}
\vec{\nabla}\cdot\vec{B} = 0,\\
\vec{\nabla}\times\vec{E} + \frac{\partial\vec{B}}{\partial t} = 0;
\end{cases}
$$
It is well-known that every divergenceless filed on $\mathbb{R}^3$ can be written a curl of another vector field just as we know that a curless field can be written as a gradient of a scalar function on $\mathbb{R}^3$. Thus from the first equation,
$$
\vec{B} = \vec{\nabla}\times\vec{A},
$$
and substituting this in the second equation,
$$
\vec\nabla\times\left(\vec{E} + \frac{\partial\vec{A}}{\partial t}\right)=0,
$$
since one can exchange the curl with the derivative w.r.t. time, and so one can set:
$$
\vec{E} + \frac{\partial\vec{A}}{\partial t} = -\vec\nabla V,
$$
from which
$$
\vec{E} = -\vec{\nabla}V - \frac{\partial\vec{A}}{\partial t}.
$$
Note that if your magnetic field is time-independent, you recover the well-know formula
$$
\vec{E} = -\vec\nabla V.
$$