Let $a<b.$ We say that a function $f:[a,b]\to\mathbb{R}$ is Baire $1$ if it is a pointwise limit of some sequence of real-valued continuous functions.
Given a sequence $(g_n)_{n=1}^\infty$ on $[a,b],$ we say that $(g_n)_{n=1}^\infty$ converges to $f$ uniformly if for every $\varepsilon>0,$ there exists $N\in\mathbb{N}$ such that for any $n\geq N$ and any $x\in [a,b],$ we have $$|g_n(x)-f(x)|<\varepsilon.$$
Theorem: If $(g_n)_{n=1}^\infty$ is a sequence of real-valued Baire $1$ functions on $[a,b]$ that converges to $f$ uniformly, then $f$ is also Baire $1.$
My attempt: For each $n\in\mathbb{N},$ since $g_n$ is Baire $1,$ there exists a sequence of continuous functions $(g_n^m)_{m=1}^\infty$ that converges to $g_n$ pointwise. Let $$f_n=g_n^n,$$ that is, choose $f_n$ 'diagonally' from the pool of $g_n^m.$ However, I notice that such $(f_n)_{n=1}^\infty$ may not converge to $f$ pointwise, as for any $x\in [a,b]$ and $\varepsilon>0,$ by uniform convergence, there exists $N\in\mathbb{N}$ such that $$|g_N(x)-f(x)|<\frac{\varepsilon}{2}.$$ By pointwise limit of $g_N,$ there exists $M \in \mathbb{N}$ such that for any $n\geq M,$ we have $$|g_N(x) - g_{N}^m(x)|<\frac{\varepsilon}{2}.$$ However, it may be the case that $N< M,$ that is, $f_N=g_N^N$ may not be 'captured' by pointwise convergence.
But I cannot change my $f_N$ as this will make the argument circular.
Any hint to fix this problem? If someone wants to provide another shorter proof, I would be glad to have a look.
You need to work with a subsequence that converges at a controllable, fast rate.
The sequence $(g_n)$ converges uniformly to $f$ and has a subsequence $(h_n)$ such that $|h_n(x) - f(x)| < 2^{-(n+1)}$for all $n$ and $x \in [a,b]$.
Using a telescoping sum we have for every $x$,
$$\tag{*}f(x) = h_1(x) + \sum_{n=1}^\infty [h_{n+1}(x) - h_{n}(x)].$$
Note that $h_{n+1} - h_{n}$ as a difference of Baire 1 functions is also Baire 1. Furthermore we have that $|h_{n+1}(x) - h_n(x)| \leqslant 2^{-n}.$
If we can show that the sum on the RHS of (*) is Baire 1 we are done. This can be accomplished by producing a convergent sequence of continuous functions.
Since $h_{n+1} - h_n$ is Baire 1 and bounded, there is a sequence of continuous functions $\phi_{nk}$ such that $\lim_{k \to \infty} \phi_{nk}(x) = h_{n+1}(x) - h_n(x)$ pointwise, and $|\phi_{nk}(x)| \leqslant 2^{-n}$ for all $k$ and $x \in [a,b]$ (details omitted).
For each $k$, there exists a function $\psi_k$ such that
$$\psi_k(x) = \sum_{n=1}^\infty \phi_{nk}(x),$$
where the series converges uniformly for all $x \in [a,b]$. Hence, the functions $\psi_k$ are continuous.
Note that for any positive integer $N$
$$\tag{**} \left|\psi_k(x) - \sum_{n=1}^\infty[h_{n+1}(x) - h_n(x)]\right| \\ \leqslant \left|\sum_{n=1}^N[\phi_{nk}(x) - h_{n+1}(x) + h_n(x)] \right|+ \sum_{n= N+1}^\infty |\phi_{nk}(x)| + \sum_{n= N+1}^\infty |h_{n+1}(x)- h_n(x)| $$
The first sum on the RHS is finite and converges to $0$ as $k \to \infty$ since $\phi_{nk} \to h_{n+1} - h_n$. The second and third terms are tails of uniformly convergent series and can be made smaller than any $\epsilon > 0$ by choosing sufficiently large $N$.
Thus,
$$\lim_{k \to \infty} \psi_k(x) = \sum_{n=1}^\infty [h_{n+1}(x) - h_n(x)],$$
and the sum on the RHS is Baire 1.