Gradient of an integral
Solution 1:
The operator $\nabla$ can be passed inside the integral if some suitable conditions on $g$ are fulfilled. There are appropriate theorems on differentiating integrals with respect to parameter. It can be done with potential $V\;$ if the function $\rho$ (say) is bounded in $\mathbb R^3$ and has bounded support, since in this case the integral $\int_{\mathbb{R}^3}\nabla{\!\!}_{x}\frac{G}{|\textbf{x}-\textbf{y}|}\rho(\textbf{y})d^3\textbf{y}$ will be converging absolutely and uniformly.
The Laplace operator cannot be put inside the integral because it would mean that $\Delta V(x)\equiv0$ and for smooth enough $\rho$ actually $\Delta V(x)=\rho(x)$. The theorem aplied above doesn't work because the integral $\int_{\mathbb{R}^3}\left|\Delta \frac{G}{|\textbf{x}-\textbf{y}|}\rho(\textbf{y})\right| d^3\textbf{y}$ may diverge. The expression $\left|\Delta \frac{1}{|\textbf{x}-\textbf{y}|}\right|$ has non-integrable singularity at $y=x$.