[proofplan]
We test the first variation only along the smooth compactly supported tangent directions allowed by the statement. For a potential $\phi\in C_c^\infty(\mathbb R^n)$, the associated density variation is $\eta_\phi=-\nabla\cdot(\rho\nabla\phi)$; we verify that it is smooth, compactly supported, and has zero total mass. The first variation formula and integration by parts then identify the directional derivative with the Otto inner product against $\nabla u_\rho$. This proves the formal gradient identity, and substituting the negative gradient velocity into the continuity equation gives the displayed gradient-flow PDE.
[/proofplan]
[step:Build an admissible density variation from a compactly supported potential]
Fix $\phi\in C_c^\infty(\mathbb R^n)$, and define the function $\eta_\phi:\mathbb R^n\to\mathbb R$ by
\begin{align*}
\eta_\phi(x)=-\nabla\cdot(\rho(x)\nabla\phi(x)).
\end{align*}
Since $\rho\in C^\infty(\mathbb R^n)$ and $\phi\in C_c^\infty(\mathbb R^n)$, the product $\rho\nabla\phi$ is a smooth compactly supported vector field, hence $\eta_\phi\in C_c^\infty(\mathbb R^n)$.
Let $K=\operatorname{supp}(\rho\nabla\phi)$. Choose $R>0$ such that $K\subset B(0,R)$. The compact support of $\rho\nabla\phi$ gives
\begin{align*}
\int_{\mathbb R^n}\eta_\phi\,d\mathcal L^n=-\int_{B(0,R)}\nabla\cdot(\rho\nabla\phi)\,d\mathcal L^n=0,
\end{align*}
because the vector field $\rho\nabla\phi$ vanishes on a neighbourhood of $\partial B(0,R)$. Thus $\eta_\phi$ is an admissible zero-mass variation for the first variation formula.
[guided]
We start with a compactly supported potential because the theorem only defines the Otto tangent directions using potentials $\phi\in C_c^\infty(\mathbb R^n)$. Fix such a $\phi$, and define the associated density variation $\eta_\phi:\mathbb R^n\to\mathbb R$ by
\begin{align*}
\eta_\phi(x)=-\nabla\cdot(\rho(x)\nabla\phi(x)).
\end{align*}
This is the density variation represented by the velocity field $\nabla\phi$ under the stated Otto convention.
We must check that $\eta_\phi$ is actually allowed in the first variation formula. Since $\rho\in C^\infty(\mathbb R^n)$ and $\phi\in C_c^\infty(\mathbb R^n)$, the vector field $\rho\nabla\phi:\mathbb R^n\to\mathbb R^n$ is smooth. Its support is contained in $\operatorname{supp}\nabla\phi$, which is compact because $\phi$ is compactly supported. Taking the divergence preserves smoothness and compact support, so $\eta_\phi\in C_c^\infty(\mathbb R^n)$.
It remains to verify the zero-mass condition. Let $K=\operatorname{supp}(\rho\nabla\phi)$, and choose $R>0$ with $K\subset B(0,R)$. Since $\rho\nabla\phi$ vanishes outside $K$, it vanishes on a neighbourhood of $\partial B(0,R)$. Therefore the Euclidean integration-by-parts formula for a compactly supported smooth vector field gives
\begin{align*}
\int_{\mathbb R^n}\eta_\phi\,d\mathcal L^n=-\int_{B(0,R)}\nabla\cdot(\rho\nabla\phi)\,d\mathcal L^n=0.
\end{align*}
Thus $\eta_\phi$ is smooth, compactly supported, and has total mass zero, exactly as required by the first variation hypothesis.
[/guided]
[/step]
[step:Use the first variation formula in the tangent direction]
Since $\eta_\phi$ is an admissible zero-mass variation, the assumed first variation formula gives
\begin{align*}
\frac{d}{ds}\Big|_{s=0}\mathcal F[\rho+s\eta_\phi]=\int_{\mathbb R^n}u_\rho(x)\eta_\phi(x)\,d\mathcal L^n(x).
\end{align*}
Substituting the definition of $\eta_\phi$ yields
\begin{align*}
\frac{d}{ds}\Big|_{s=0}\mathcal F[\rho+s\eta_\phi]=-\int_{\mathbb R^n}u_\rho(x)\nabla\cdot(\rho(x)\nabla\phi(x))\,d\mathcal L^n(x).
\end{align*}
The integral is finite because $\nabla\cdot(\rho\nabla\phi)$ is compactly supported and smooth, while $u_\rho$ is smooth.
[/step]
[step:Integrate by parts to identify the Otto inner product]
Let $K=\operatorname{supp}(\rho\nabla\phi)$, and choose $R>0$ with $K\subset B(0,R)$. Since $\rho\nabla\phi$ vanishes on a neighbourhood of $\partial B(0,R)$, integration by parts on $B(0,R)$ gives
\begin{align*}
-\int_{\mathbb R^n}u_\rho(x)\nabla\cdot(\rho(x)\nabla\phi(x))\,d\mathcal L^n(x)=\int_{\mathbb R^n}\nabla u_\rho(x)\cdot\nabla\phi(x)\rho(x)\,d\mathcal L^n(x).
\end{align*}
Therefore
\begin{align*}
\frac{d}{ds}\Big|_{s=0}\mathcal F[\rho+s\eta_\phi]=(\nabla u_\rho,\nabla\phi)_\rho.
\end{align*}
The right-hand side is finite because $\nabla\phi$ is compactly supported, $\rho$ is smooth, and $\nabla u_\rho$ is smooth.
[/step]
[step:Conclude the formal Wasserstein gradient identity]
By the defining Riemannian-gradient property in the smooth Otto tangent space, the formal gradient velocity is the vector field whose $\rho$-inner product with every compactly supported gradient direction $\nabla\phi$ equals the first variation in the corresponding density direction $-\nabla\cdot(\rho\nabla\phi)$. The previous step proves that this vector field is $\nabla u_\rho$. Hence
\begin{align*}
\operatorname{grad}_{W_2}\mathcal F(\rho)=\nabla u_\rho=\nabla\frac{\delta\mathcal F}{\delta\rho}(\rho).
\end{align*}
If $u_\rho$ is replaced by $u_\rho+c$ for a constant $c\in\mathbb R$, its gradient is unchanged, so the additive constant ambiguity does not affect the formula.
[/step]
[step:Substitute the negative gradient velocity into the continuity equation]
Let $I\subset\mathbb R$ be an interval and let $(\rho_t)_{t\in I}$ be a smooth curve satisfying the hypotheses in the statement. For each $t\in I$, define
\begin{align*}
u_t=\frac{\delta\mathcal F}{\delta\rho}(\rho_t).
\end{align*}
The gradient identity just proved gives
\begin{align*}
\operatorname{grad}_{W_2}\mathcal F(\rho_t)=\nabla u_t.
\end{align*}
Under the negative gradient-flow convention, the velocity field $v_t:\mathbb R^n\to\mathbb R^n$ is
\begin{align*}
v_t=-\operatorname{grad}_{W_2}\mathcal F(\rho_t)=-\nabla u_t.
\end{align*}
Substituting this into
\begin{align*}
\partial_t\rho_t+\nabla\cdot(\rho_t v_t)=0
\end{align*}
gives
\begin{align*}
\partial_t\rho_t+\nabla\cdot(-\rho_t\nabla u_t)=0.
\end{align*}
Equivalently,
\begin{align*}
\partial_t\rho_t=\nabla\cdot(\rho_t\nabla u_t)=\nabla\cdot\left(\rho_t\nabla\frac{\delta\mathcal F}{\delta\rho}(\rho_t)\right).
\end{align*}
This is the asserted formal Wasserstein gradient-flow equation.
[/step]