To respond to your comment on Byron's answer:
The functional monotone class theorem is a very useful result and well worth knowing. However, you can also get this result with arguments that may be more familiar. To recap, we want to show:
Suppose $\mu', \mu''$ are two probability measures on $\mathbb{R}$, and we have $\int f\,d\mu' = \int f\,d\mu''$ for all bounded continuous $f$. Then $\mu' = \mu''$.
One could proceed as follows:
Exercise. For any open interval $(a,b)$, there is a sequence of nonnegative bounded continuous functions $f_n$ such that $f_n \uparrow 1_{(a,b)}$ pointwise.
(For example, some trapezoidal-shaped functions would work.)
If $f_n$ is such a sequence, we have $\int f_n \,d\mu' = \int f_n \,d\mu''$ for each $n$. By monotone convergence, the left side converges to $\int 1_{(a,b)}\,d\mu' = \mu'((a,b))$ and the right side converges to $\mu''((a,b))$. So $\mu'((a,b)) = \mu''((a,b))$, and this holds for any interval $(a,b)$.
Now you can use Dynkin's $\pi$-$\lambda$ lemma, once you show:
Exercise. The collection
$$\mathcal{L} := \{B \in \mathcal{B}_\mathbb{R} : \mu'(B) = \mu''(B)\}$$
is a $\lambda$-system. (Here $\mathcal{B}_{\mathbb{R}}$ is the Borel $\sigma$-algebra on $\mathbb{R}$.)
We just showed that the open intervals are contained in $\mathcal{L}$. But the open intervals are a $\pi$-system which generates $\mathcal{B}_{\mathbb{R}}$. So by Dynkin's lemma, $\mathcal{B}_\mathbb{R} \subset \mathcal{L}$, which is to say $\mu' = \mu''$.
The point is precisely that $g$ is Lebesgue measurable, but not Borel measurable.
If it was Borel measurable, we would get the contradiction you describe.
Also note the way the measurability is proved: Completeness of the Lebesgue measure (on the Lebesgue measurable sets) is invoked. When restricted to the Borel sets, this completeness fails.
Best Answer
As PhoemueX in the comments said, the Dirichlet function is a counterexample which is in Baire class 2, but not in Baire class 1 because the function is nowhere continuous and class 1 functions can only be discontinuous on a meagre set.