First we look for a distributional solution. Remember that, as an distribution, $\Delta u$ is defined by $$\langle\Delta u,v \rangle=-\langle\nabla u,\nabla v\rangle,\ \forall\ v\in C_0^\infty(\Omega). \tag{1}$$
From $(1)$, we can say that a solution in the distributional sense, is a function $u\in H^1(\Omega)$ with $Tu=g$ satisfying $$\int_\Omega \nabla u\nabla v=0,\ \forall\ v\in C_0^\infty(\Omega). \tag{2}$$
By density we may conclude from $(2)$ that $$\int_\Omega \nabla u\nabla v=0,\ \forall v\in H_0^1(\Omega). \tag{3}$$
This is not the only weak formulation for this problem, however, it is the one which comes from a variational problem, to wit, let $F:\{u\in H^1(\Omega):\ Tu=g \}\to \mathbb{R}$ be defined by $$Fu=\frac{1}{2}\int_\Omega |\nabla u|^2.$$
Note that $(3)$ can be rewritten as $$\langle F'(u),v\rangle=0,\ \forall\ v\in H_0^1(\Omega). \tag{4}$$
Also note that, once $\{u\in H^1(\Omega):\ Tu=g \}$ is a closed convex set of $H^1(\Omega)$ and $F$ is a coercive, weakly lower semi continuous function, we have that $F$ has a unique global minimum which satisfies $(4)$.
By not considering any kind of derivative of $u$, you can also use another weak formulation: let $C_0^{1,\Delta}(\overline{\Omega})=\{u\in C_0^1(\overline{\Omega}):\ \Delta u \in L^\infty(\Omega)\}$. A "very" weak solution, is a function $u\in L^1(\Omega)$ satisfying $$\int_\Omega u\Delta v=-\int_{\partial\Omega}g\frac{\partial v}{\partial \nu },\ \forall\ v\in C_0^{1,\Delta}(\overline{\Omega}).$$
In your setting, I mean, when $g\in H^{1/2}(\Omega)$, it can be proved that both definitions are equivalent. For references, take a look in the paper Elliptic Equations Involving Measures from Veron. It has a PDF version here. Take a look in page 8.
To conclude, I would like to adress @JLA, which gave a comment in OP; in the end, what we really want is a $H^2$ function (or more regular), because we are working with the Laplacean and it is natural to have two derivatives.
It can be proved, by using regularity theory, that $u$ is in fact in $H^2$, however, there is a huge difference between proving that $u$ is in $H^2$ after finding it in $H^1$ by the above methods and finding directly $u\in H^2(\Omega)$ by another method. Note, for example, that none of the methods above, does apply if we change $H_0^1(\Omega)$ by $H^2(\Omega)$.
Here is the most general divergence theorem that I am aware of:
Theorem. Let $\Omega$ be an open subset of $\mathbb{R}^N$ of class $C^1$ with a bounded frontier $\Gamma$ and $v \in W^{1,1}(\Omega,\mathbb{R}^N)$. Then
$$
\int_\Omega \operatorname{div} v\, dx = \int_\Gamma \gamma_0(v)\cdot \nu \, d\gamma
$$
where $\gamma_0$ is the trace operator.
This is Theorem 6.3.4 of Michel Willem's book Functional analysis. It seems to me that if you want to take $v = u \nabla w$ some strong assumption on the regularity of $u$ and $w$ should be made.
Best Answer
You cannot define a normal derivative trace $\frac{\partial }{\partial \nu}$ acting from $H^{1}(\Omega)$ to $H^{-\frac{1}{2}}(\Gamma)$ such that it has reasonable properties:
For $\varphi \in C_0^\infty(\Omega)$, we would expect $\frac{\partial}{\partial \nu} \varphi = 0$, since $\varphi$ has compact support. But now, $C_0^\infty(\Omega)$ is (by definition) dense in $H_0^1(\Omega)$. This means, that every function in $H_0^1(\Omega)$ has not only zero trace but also a zero normal derivative trace. But we do not expect this for an arbitrary function from $H_0^1(\Omega) \cap C^1(\bar\Omega)$.
In order to define a normal derivative trace, you need a stronger norm in the domain, e.g. the norm of the space $$\{u \in H^1(\Omega) : \Delta u \in L^2(\Omega)\}.$$ Then, you can use your formula to define the normal derivative trace.