Let me first illustrate in the case where $d=2$. In my notation, the coordinates for $\mathbb R^2$ are $(x_1,x_2)$, while the coordinates for the unit ball are $(v_1,v_2)$.
Let $B_d$ denote the unit ball in $d$ dimensions, and let $S_{d-1}$ denote the sphere which is the boundary of $B_d$. When I say $\text{vol }B_d$, I mean the $d$-dimensional volume of the unit ball, and similarly $\text{vol }S_{d-1}$ denotes the $(d-1)$-dimensional volume of $S_{d-1}$. Then
$$
g(x_1,x_2)=\frac1{\text{vol } B_2}\int_{-1}^1\int_{-\sqrt{1-v_2^2}}^{\sqrt{1-v_2^2}}f(x_1+v_1,x_2+v_2)\,dv_1\,dv_2
$$
To compute $\nabla g=(\frac{\partial}{\partial x_1}g,\frac{\partial}{\partial x_2}g)$, start by looking at the first coordinate.
$$
\begin{align}
&\frac{\partial}{\partial x_1}g(x_1,x_2)
\\
&=\frac1{\text{vol } B_2}\frac{\partial}{\partial x_1}\int_{-1}^1\int_{-\sqrt{1-v_2^2}}^{\sqrt{1-v_2^2}}f(x_1+v_1,x_2+v_2)\,dv_1\,dv_2
\\
&=\frac1{\text{vol } B_2}\int_{-1}^1
\color{black}{\frac{\partial}{\partial x_1}
\int_{-\sqrt{1-v_2^2}}^{\sqrt{1-v_2^2}}f(x_1+v_1,x_2+v_2)\,dv_1}\,dv_2\tag1
\\
&=\frac1{\text{vol } B_2}\int_{-1}^1
\big[f(x_1+\sqrt{1-v_2^2},x_2+v_2)-f(x_1-\sqrt{1-v_2^2},x_2+v_2)\big]\,dv_2\tag2
\\
&=\frac1{\text{vol } B_2}\int_{-\pi/2}^{\pi/2}
\big[f(x_1+\cos\theta,x_2+\sin\theta)-f(x_1-\cos\theta,x_2+\sin\theta)\big]\cdot \cos\theta\,d\theta
\\
&=\frac1{\text{vol } B_2}\int_{-\pi}^{\pi}
f(x_1+\cos\theta,x_2+\sin\theta) \cos\theta\,d\theta
\\
&=\frac1{\text{vol } B_2}\int_{(u_1,u_2)\in \text{unit circle}} f(x_1+u_1,x_2+u_2)\cdot u_1\,du
\end{align}
$$
Explanations:
Here, I interchanged the order of differentiation and integration, which is a special case of the Leibniz integral rule.
You already know that, in one dimension, that $\frac{d}{dx}\int_{a}^b f(x+t)\,dt=f(x+b)-f(x+a)$, which is provable via FOTC. I am applying this to the innermost integral of the previous line.
By the exact same logic, you also get $\frac{\partial}{\partial x_2}g=\int_{(u_1,u_2)\in \text{unit circle}} f(x_1+u_1,x_2+u_2)\cdot u_2\,du$. Combining these two equations into a single vector equation gives
$$
\begin{align}
\nabla g
&= \frac1{\text{vol } B_2}\int_{u\in \text{unit circle}} f(x_1+u_1,x_2+u_2)\cdot u\,du
\\&=\frac{\text{vol }S_1}{\text{vol } B_2}\cdot \frac1{\text{vol } S_1}\int_{u\in \text{unit circle}} f(x_1+u_1,x_2+u_2)\cdot u\,du
\\&=\frac{2\pi}{\pi}\cdot\mathbb E_{u\in S_1}[f(x+u)u]
\end{align}
$$
The exact same proof blueprint can be applied to prove the result in $d$ dimensions; the notation just gets more cumbersome. For each $i\in \{1,\dots,d\}$, when evaluating $\frac{\partial}{\partial x_i} g$, you will choose an order of integration so the innermost integral is with respect to $v_i$. Then, you move the partial derivative $\frac{\partial}{\partial x_i}$ next to the innermost integral, and apply the law $\frac{d}{dx}\int_{a}^b f(x+t)\,dt=f(x+b)-f(x+a)$ to that innermost integral. You are now left with $d-1$ integrals, and with a change of variables, you can realize this as an integral over $S_{d-1}$.
I could write this all out if needed, but I would rather not.