What is the $L^2$ gradient flow? What does $L^2$ gradient flow mean? Here is the Ginzburg–Landau free
energy:
$$\mathcal{E}(\phi):=\int_{\Omega}(F(\phi)+\frac{\epsilon^2}{2}|\nabla\phi|^2)\text{d}\mathbf{x}$$
Some references say the Allen-Cahn equation 
$$\frac{\partial \phi(\mathbf{x},t)}{\partial t} =
{\epsilon^2}\Delta\phi(\mathbf{x},t)-F'(\phi(\mathbf{x},t))$$
$$\frac{\partial \phi(\mathbf{x},t)}{\partial \mathbf{n}}=0, \ \text{on} \ \partial \Omega \times [0,T]$$
is the $L^2$-gradient flow of the total free energy $\mathcal{E}(\phi)$.
How to derive this?
 A: Given an energy $\mathcal{E}(\phi)$, the associated gradient flow is given by the equation
\begin{equation}
 \frac{\partial \phi}{\partial t} = - \frac{\partial \mathcal{E}}{\partial \phi}. \tag{1}
\end{equation}
In other words, $\phi$ decreases along the gradient of $\mathcal{E}$. The terminology stems from the 'finite dimensional' case, where a function $f(x,y,z)$ produces a vector field $V = \nabla f$, which is called its 'gradient vector field'. Then, as with any vector field, one can study the flow induced by that vector field, i.e. the flow of the dynamical system given by $\dot{x} = V(x)$. 
In $(1)$, the notation $\frac{\partial \mathcal{E}}{\partial \phi}$ denotes the so-called functional derivative of $\mathcal{E}$ to $\phi$, which generalises the 'gradient' notion for functions. There exist multiple versions of the functional derivative, mainly because its definition depends on the function space on which $\mathcal{E}$ acts. Anyway, the idea is to perturb $\phi$ a bit, i.e. to substitute $\phi \to \phi + \delta \psi$ with $0 < \delta \ll 1$, and work out the resulting expression. In the Ginzburg-Landau case, you get
\begin{align}
 \mathcal{E}(\phi+\delta \psi) &= \int_\Omega F(\phi+\delta \psi) + \frac{\epsilon^2}{2} \left| \nabla \phi + \delta \nabla \psi\right|^2\,\text{d}\mathbf{x}\\
&= \int_\Omega F(\phi) + \delta F'(\phi)\,\psi + \frac{\epsilon^2}{2} \left| \nabla \phi\right|^2 + \epsilon^2 \delta \nabla \phi \cdot \nabla \psi + \delta^2 \frac{\epsilon^2}{2}\left|\nabla \psi\right|^2\,\text{d}\mathbf{x}\\
&= \mathcal{E}(\phi) + \delta \int_\Omega F'(\phi)\,\psi + \epsilon^2 \nabla \phi \cdot \nabla \psi\,\text{d}\mathbf{x} + \mathcal{O}(\delta^2)\\
&= \mathcal{E}(\phi) + \delta \int_\Omega \left[F'(\phi) - \epsilon^2 \Delta \phi\right] \psi\,\text{d}\mathbf{x} + \int_{\delta \Omega}\nabla \phi \cdot \nabla \psi\,\text{d}\mathbf{n} +  \mathcal{O}(\delta^2),
\end{align}
where the last equation was derived using Stokes' theorem. If you now assume that the gradient of $\phi$ vanishes at the boundary of $\Omega$, the integral over $\delta\Omega$ vanishes, and you're left with
\begin{equation}
\mathcal{E}(\phi+\delta \psi) - \mathcal{E}(\phi) = \delta \int_\Omega \left[F'(\phi) - \epsilon^2 \Delta \phi\right] \psi\,\text{d}\mathbf{x} = \delta \left\langle F'(\phi) - \epsilon^2 \Delta \phi,\psi\right\rangle_2
\end{equation}
up to terms of order $\delta^2$, where $\langle \cdot,\cdot \rangle$ is the $L_2$ inner product over $\Omega$. The above is now interpreted as the directional derivative of $\mathcal{E}$ in the direction of $\psi$, i.e.
\begin{equation}
 \left\langle \frac{\partial \mathcal{E}}{\partial \phi},\psi\right\rangle_2 := \lim_{\delta \to 0} \frac{\mathcal{E}(\phi+\delta \psi)-\mathcal{E}(\phi)}{\delta} = \left\langle F'(\phi) - \epsilon^2 \Delta \phi,\psi\right\rangle_2,
\end{equation}
and therefore we see that
\begin{equation}
\frac{\partial \mathcal{E}}{\partial \phi} = F'(\phi) - \epsilon^2 \Delta \phi. \tag{2}
\end{equation}
Using $(2)$ in $(1)$ now gives the Allen-Cahn equation.
