Abstractly, the metric on $\Sigma:=\partial U$ is defined by pullback along the inclusion $i:\Sigma\hookrightarrow \Bbb R^n$. This just means that if $u$ and $v$ are geometrically tangent to $\Sigma$ in $\Bbb R^n$, then $g(u,v):=u\cdot v$, the Euclidean dot product.
For $p\in\Sigma$ we can take an orthonormal basis of $T_p\Bbb R^n$ that is $e_1,\dotsc,e_{n-1},n$, where $e_1,\dotsc,e_{n-1}$ are tangent to $\Sigma$ and $n$ is a choice of normal. Then $\nabla f=\sum_{i=1}^{n-1}(e_if)e_i+(\partial_nf)n$, so dotting this with itself and using the fact that this is an orthonormal basis gives your claim.
In response to the comment, I'll elaborate. I now realize there's a conflict of notation so we'll rename the ambient space to $\Bbb R^d$. The notation $e_if$ is just the action of $e_i$ on the (smooth) function $f$ as a tangent vector. The notation $\partial_nf$ is just code for $nf$, as well.
Now $\nabla f$ is the total gradient of $f$ on $\Bbb R^d$. In the PDE world, this means it's $(\partial_1f,\dotsc,\partial_df)$, where $\partial_i:=\partial/\partial x^i$. In differential geometric language, $\nabla f=\sum_{i=1}^d (\partial_if)\partial_i.$ (For other ambient manifolds, you need to worry about the metric here.) But in fact, if $v_1,\dotsc,v_d$ is any basis of $T_p\Bbb R^d$, then $\nabla f=\sum_{i=1}^d(v_if)v_i$. What I wrote above is this in the particular case that $v_1,\dotsc, v_{d-1}$ are an orthonormal basis of $T_p\Sigma$ and $n=v_d$ is a normal vector.
Now $\nabla_\Sigma f$ is by definition the part of $\nabla f$ tangent to $\Sigma$. By above expansion, we indeed have $$\nabla_\Sigma f=\sum_{i=1}^{d-1}(e_if)e_i$$
if $e_1,\dotsc, e_{d-1}$ is an orthonormal basis of $T_p\Sigma$. In a coordinate basis of $\Sigma$, we have the formula
$$\nabla_\Sigma f=g^{ij}\partial_jf\partial_iF,$$
where $F$ is the inclusion $\Sigma\hookrightarrow \Bbb R^d$.