[proofplan]
We write the smooth density curve as a measure curve $\mu_t=\rho_t\,d\mathcal L^n$ and the transport velocity as $v_t=\nabla\phi_t$. The continuity equation makes $(\mu_t,v_t)$ an admissible finite-action pair on every compact subinterval of $I$. The metric derivative theory for Wasserstein absolutely continuous curves identifies the squared speed with the minimal kinetic energy among all velocity fields solving the same continuity equation. Since the hypothesis says that $\nabla\phi_t$ is exactly this minimal representative, the formal Wasserstein [inner product](/page/Inner%20Product) norm equals the metric speed.
[/proofplan]
[step:Rewrite the density equation as a measure-valued continuity equation]
Define the measure curve
\begin{align*}
\mu:I&\to\mathcal P_2(\mathbb R^n)
\end{align*}
\begin{align*}
t&\mapsto \mu_t:=\rho_t\,d\mathcal L^n
\end{align*}
and define the Borel vector field
\begin{align*}
v:I\times\mathbb R^n&\to\mathbb R^n
\end{align*}
\begin{align*}
(t,x)&\mapsto v_t(x):=\nabla\phi_t(x).
\end{align*}
Let $\zeta\in C_c^\infty(I\times\mathbb R^n)$. The assumed decay at infinity justifies [integration by parts](/theorems/210) in the spatial variable, and the equation
\begin{align*}
\partial_t\rho_t+\operatorname{div}(\rho_t\nabla\phi_t)=0
\end{align*}
gives
\begin{align*}
\int_I\int_{\mathbb R^n}\partial_t\zeta(t,x)\rho_t(x)\,d\mathcal L^n(x)\,d\mathcal L^1(t)
+
\int_I\int_{\mathbb R^n}\nabla_x\zeta(t,x)\cdot v_t(x)\rho_t(x)\,d\mathcal L^n(x)\,d\mathcal L^1(t)
=0.
\end{align*}
Thus $(\mu_t,v_t)$ solves the distributional continuity equation on $I$.
[guided]
We first translate the PDE for densities into the standard Wasserstein language. Define
\begin{align*}
\mu:I&\to\mathcal P_2(\mathbb R^n)
\end{align*}
\begin{align*}
t&\mapsto \mu_t:=\rho_t\,d\mathcal L^n
\end{align*}
and
\begin{align*}
v:I\times\mathbb R^n&\to\mathbb R^n
\end{align*}
\begin{align*}
(t,x)&\mapsto v_t(x):=\nabla\phi_t(x).
\end{align*}
The point of this notation is that Wasserstein tangent vectors are represented by vector fields $v_t$ through the measure-valued continuity equation.
Let $\zeta\in C_c^\infty(I\times\mathbb R^n)$ be a [test function](/page/Test%20Function). Since $\rho_t$ and $\phi_t$ have the decay required in the statement, [integration by parts](/theorems/2098) in the spatial variable produces no boundary term at infinity. Multiplying
\begin{align*}
\partial_t\rho_t+\operatorname{div}(\rho_t\nabla\phi_t)=0
\end{align*}
by $\zeta$ and integrating over $I\times\mathbb R^n$ with respect to $\mathcal L^1\otimes\mathcal L^n$ gives
\begin{align*}
\int_I\int_{\mathbb R^n}\zeta(t,x)\partial_t\rho_t(x)\,d\mathcal L^n(x)\,d\mathcal L^1(t)
+
\int_I\int_{\mathbb R^n}\zeta(t,x)\operatorname{div}(\rho_t\nabla\phi_t)(x)\,d\mathcal L^n(x)\,d\mathcal L^1(t)
=0.
\end{align*}
Integrating the first term by parts in $t$ and the second term by parts in $x$ yields
\begin{align*}
-\int_I\int_{\mathbb R^n}\partial_t\zeta(t,x)\rho_t(x)\,d\mathcal L^n(x)\,d\mathcal L^1(t)
-
\int_I\int_{\mathbb R^n}\nabla_x\zeta(t,x)\cdot\nabla\phi_t(x)\rho_t(x)\,d\mathcal L^n(x)\,d\mathcal L^1(t)
=0.
\end{align*}
Multiplying by $-1$ and using $v_t=\nabla\phi_t$, we obtain
\begin{align*}
\int_I\int_{\mathbb R^n}\partial_t\zeta(t,x)\,d\mu_t(x)\,d\mathcal L^1(t)
+
\int_I\int_{\mathbb R^n}\nabla_x\zeta(t,x)\cdot v_t(x)\,d\mu_t(x)\,d\mathcal L^1(t)
=0.
\end{align*}
This is precisely the distributional continuity equation for the measure curve $(\mu_t)_{t\in I}$ driven by the velocity field $(v_t)_{t\in I}$.
[/guided]
[/step]
[step:Localize to compact time intervals with finite kinetic action]
Let $[\alpha,\beta]\subset I$ be compact. By hypothesis,
\begin{align*}
v_t=\nabla\phi_t\in L^2(\mu_t;\mathbb R^n)
\end{align*}
for $\mathcal L^1$-a.e. $t\in[\alpha,\beta]$. The local finite-action assumption gives
\begin{align*}
A_{\alpha,\beta}:=\int_\alpha^\beta\int_{\mathbb R^n}|v_t(x)|^2\,d\mu_t(x)\,d\mathcal L^1(t)
=
\int_\alpha^\beta\int_{\mathbb R^n}|\nabla\phi_t(x)|^2\rho_t(x)\,d\mathcal L^n(x)\,d\mathcal L^1(t)<\infty.
\end{align*}
Hence $(\mu_t,v_t)$ is a finite-action admissible pair on $[\alpha,\beta]$.
[/step]
[step:Identify the metric derivative with the minimal velocity norm]
By the metric-derivative characterization of absolutely continuous Wasserstein curves, equivalently by the minimal velocity field theorem for $\mathcal P_2(\mathbb R^n)$ as in [citetheorem:10023], the finite-action continuity equation on $[\alpha,\beta]$ implies that
\begin{align*}
t\mapsto\mu_t
\end{align*}
is absolutely continuous as a curve in $(\mathcal P_2(\mathbb R^n),W_2)$, and for $\mathcal L^1$-a.e. $t\in[\alpha,\beta]$ there is a unique minimal velocity representative
\begin{align*}
u_t\in \overline{\{\nabla \psi:\psi\in C_c^\infty(\mathbb R^n)\}}^{L^2(\mu_t)}
\end{align*}
satisfying the same continuity equation derivative as $v_t$, with
\begin{align*}
|\mu'|^2(t)=\int_{\mathbb R^n}|u_t(x)|^2\,d\mu_t(x).
\end{align*}
The hypotheses of this result are satisfied here: the curve has values in $\mathcal P_2(\mathbb R^n)$, the pair $(\mu_t,v_t)$ solves the distributional continuity equation by the first step, and the kinetic action is finite on $[\alpha,\beta]$ by the preceding step.
The theorem's minimality assumption says that, for $\mathcal L^1$-a.e. $t\in[\alpha,\beta]$, the field $v_t=\nabla\phi_t$ is this $L^2(\mu_t;\mathbb R^n)$-minimal representative. Therefore $u_t=v_t$ in $L^2(\mu_t;\mathbb R^n)$ for $\mathcal L^1$-a.e. $t\in[\alpha,\beta]$, and consequently
\begin{align*}
|\mu'|^2(t)=\int_{\mathbb R^n}|v_t(x)|^2\,d\mu_t(x)
\end{align*}
for $\mathcal L^1$-a.e. $t\in[\alpha,\beta]$.
[guided]
The key point is that a velocity field solving the continuity equation is not unique. If $w_t:\mathbb R^n\to\mathbb R^n$ is another Borel field satisfying
\begin{align*}
\partial_t\mu_t+\operatorname{div}(\mu_t w_t)=0,
\end{align*}
then it generates the same infinitesimal motion of measures, but its $L^2(\mu_t;\mathbb R^n)$ norm may be larger than necessary. Wasserstein geometry selects the velocity of smallest $L^2(\mu_t;\mathbb R^n)$ norm.
We apply the minimal velocity field theorem for absolutely continuous Wasserstein curves, stated in this pipeline as [citetheorem:10023]. Its hypotheses are exactly the following. First, the curve must take values in $\mathcal P_2(\mathbb R^n)$; this is part of the theorem statement because $\rho_t\,d\mathcal L^n$ has finite second moment for every $t\in I$. Second, the pair must solve the continuity equation; this was verified in the first step by testing against $\zeta\in C_c^\infty(I\times\mathbb R^n)$ and integrating by parts. Third, the action must be finite on the time interval under consideration; this is exactly the local finite-action hypothesis on every compact interval $[\alpha,\beta]\subset I$, written for $v_t=\nabla\phi_t$ as
\begin{align*}
A_{\alpha,\beta}:=\int_\alpha^\beta\int_{\mathbb R^n}|v_t(x)|^2\,d\mu_t(x)\,d\mathcal L^1(t)<\infty.
\end{align*}
The conclusion gives a minimal representative
\begin{align*}
u_t\in \overline{\{\nabla \psi:\psi\in C_c^\infty(\mathbb R^n)\}}^{L^2(\mu_t)}
\end{align*}
for $\mathcal L^1$-a.e. $t\in[\alpha,\beta]$, and this representative satisfies
\begin{align*}
|\mu'|^2(t)=\int_{\mathbb R^n}|u_t(x)|^2\,d\mu_t(x).
\end{align*}
Now we use the special hypothesis of the present theorem: $v_t=\nabla\phi_t$ is already the $L^2(\mu_t;\mathbb R^n)$-minimal velocity representative among all fields producing the same density derivative. Minimal representatives agree as elements of $L^2(\mu_t;\mathbb R^n)$, so
\begin{align*}
u_t=v_t
\end{align*}
in $L^2(\mu_t;\mathbb R^n)$ for $\mathcal L^1$-a.e. $t\in[\alpha,\beta]$. Substituting this equality into the metric-speed identity gives
\begin{align*}
|\mu'|^2(t)=\int_{\mathbb R^n}|v_t(x)|^2\,d\mu_t(x)
\end{align*}
for $\mathcal L^1$-a.e. $t\in[\alpha,\beta]$.
[/guided]
[/step]
[step:Substitute the density and gradient potential notation]
Since $d\mu_t(x)=\rho_t(x)\,d\mathcal L^n(x)$ and $v_t(x)=\nabla\phi_t(x)$, the preceding identity becomes
\begin{align*}
|\mu'|^2(t)=\int_{\mathbb R^n}|\nabla\phi_t(x)|^2\rho_t(x)\,d\mathcal L^n(x)
\end{align*}
for $\mathcal L^1$-a.e. $t\in[\alpha,\beta]$. Because $[\alpha,\beta]\subset I$ was arbitrary, the same equality holds for $\mathcal L^1$-a.e. $t\in I$. With the conventional notation $|\dot\rho_t|_{W_2}:=|\mu'|(t)$ for the Wasserstein speed of the density curve, this is exactly
\begin{align*}
|\dot\rho_t|_{W_2}^2=\int_{\mathbb R^n}|\nabla\phi_t(x)|^2\rho_t(x)\,d\mathcal L^n(x).
\end{align*}
[/step]