My professor mentioned something like "Laplace's equation is solved when the functional $E[u] = \int_{\Omega}|\nabla u|^2 $ is minimized."
I've been trying to understand this statement. If I say that $E[u+tv]$ has a minimum at $t=0$, I get the condition
$$\int_{\partial \Omega}v \frac{\partial u}{\partial \nu} = \int_\Omega v \Delta u.$$
But what does this show? Can someone help me to flesh this out? Must $\Omega$ be bounded?
No, $\Omega$ need not be bounded. Rather, the support of the test function $v$ is bounded (more precisely, a compact subset of $\Omega$). This ensures that $u+tv$ has the same boundary values as $u$. By the way, the quoted statement by the professor implicitly continues with "... among $W^{1,2}$ functions with given boundary values".
If $\int_\Omega v g=0$ for all test function $v$, then $g$ is zero a.e. Indeed, otherwise $g$ would have a Lebesgue point $p$ with nonzero value. We would pick a small neighborhood $N$ of $p$ and let $g$ be a smooth approximation of the characteristic function of $N$. This would lead to $\int vg\ne 0$, a contradiction.