$\newcommand\R{\mathbb R}\newcommand{\Om}{\Omega}$It is convenient to reverse the time by the substitution $t\leftrightarrow T-t$ and also rescale it by a factor of $2$. So, the boundary value problem becomes the following:
\begin{align}
\frac{\partial u}{\partial t} +\frac12 \Delta u &= 0 \quad \text{on } D, \tag{1}\label{1}
\\
u &= f \quad \text{on } C, \tag{2}\label{2}
\end{align}
where $D:=\Om\times(0,T)$; $C:=\{(x,t)\in\partial D\colon t>0\}
=(\partial\Om\times(0,T])\cup(\Om\times\{T\})$ (which corresponds to the "lower boundary" of $D$, according to Doob, p. 218, who chose to not reverse the time); $f(x,t):=g(x,t)$ if $(x,t)\in\partial\Om\times[0,T]$, and $f(x,t):=h(x)$ if $(x,t)\in\Om\times\{T\}$. For the just given definition of $f$ to be consistent, we need the condition $g(x,T)=h(x)$ for all $x\in\partial\Om$; of course, the corresponding consistency condition ($g(x,0)=h(x)$ for all $x\in\partial\Om$) was needed in the original setting, before the time reversal.
Let $(B_t)_{t\ge0}$ be a standard Brownian motion in $\R^n$. For any $z\in D\cup C$, let $\tau_z:=\inf\{t\ge0\colon z+(B_t,t)\notin D\cup C\}$, the exit time of the Brownian motion from $D\cup C$ starting at the point $z$. As in Doob's paper, let $Z(z,C):=B_{\tau_z}$.
Assume that $f$ is continuous. Then, according to Doob's Theorem 2.1, the function $u$ on $D$ defined by the formula
\begin{equation*}
u(z):=Ef(Z(z,C)) \tag{3}\label{3}
\end{equation*}
for $z\in D$ will be parabolic, that is, $u$ will satisfy condition \eqref{1}.
Suppose also that for some $y\in\partial\Om$ the following Poincaré condition is satisfied: there exist a nonempty open cone $K_y\subset\R^n$ with the vertex at $y$ and a neighborhood $V_y\subset\R^n$ of $y$ such that $K_y\cap V_y\cap\Om=\emptyset$. Then, using the Kolmogorov 0-1 law, it is easy to see that for each $t\in[0,T]$ we have $\tau_{(y,t)}=0$ almost surely, which in turn implies that $u(z)\to f(y,t)$ as $D\ni z\to(y,t)$.
Let us say that $\partial\Om$ satisfies the Poincaré condition if the Poincaré condition is satisfied for every point in $\partial\Om$.
(Of course, if $\partial\Om$ is $C^1$ or if $\Om$ is the interior of a polytope with a nonempty interior, then $\partial\Om$ satisfies the Poincaré condition.)
We conclude that, if $f$ is continuous and $\partial\Om$ satisfies the Poincaré condition, then formula \eqref{3} gives a solution to problem \eqref{1}--\eqref{2}, with condition \eqref{2} satisfied in the following sense: for each $z_0\in C$ we have $u(z)\to f(z_0)$ as $D\ni z\to z_0$.
More generally (cf. the first full paragraph on p. 230 of Doob's paper), if $f$ is a bounded Baire function and $u$ is given by \eqref{3}, then \eqref{1} will hold and, moreover, we will have $u(z)\to f(z_0)$ as $D\ni z\to z_0$ for each $z_0=(y_0,t_0)\in C$ such that (i) $f$ is continuous at $z_0$ and (ii) either $t_0=T$ or the Poincaré condition is satisfied for $y_0$.