$\newcommand{\set}[1]{\{#1\}}$ $\newcommand{\R}{\mathbb R}$ $\newcommand{\bd}{\text{Bd}}$ Let $X$ be a compact metric space and $f_n:X\to \R$ be a continuous function on $X$, one for each $n$. Assume $f_n$ converges uniformly to a function $f:X\to \R$.
Let $Z_n$ be the zero-set of $f_n$, that is $Z_n$ is the set of all the points $x$ in $X$ such that $f_n(x) = 0$. Let $Z$ be the zero-set of $f$.
Assume that there are two points $p$ and $q$ in $X$ such that $p, q\in Z_n$ for each $n$. It follows that $p, q\in Z$.
Lemma. If $p$ and $q$ are in the same connected component of $Z_n$ for each $n$, then they are also in the same connected component of $Z$.
(A proof of the lemma is at the end (I haven't seen it in a book or paper so there could be a mistake with my reasoning)).
Question. Can we replace
componentwithpath componentin the above lemma?
In other words, if, for each $n$, there was a path $\gamma_n:[0, 1]\to X$ such that $f_n\circ \gamma_n$ is identically $0$ and $\gamma_n(0) = p, \gamma_n(1)= q$, then can we say that there is a path $\gamma:[0, 1] \to X$ with $f\circ \gamma$ being identically zero and $\gamma(0) = p, \gamma(1) = q$.
Proof of Lemma. Suppose not. First note that $f$ is continuous since it the uniform limit of a sequence of continuous functions on a compact metric space. Therefore $Z$, like each $Z_n$, is a closed subset of $X$.
Since we have assumed that $p$ and $q$ are in different components of $Z$, there exist disjoint open sets $U$ and $V$ of $X$ such that
- $p\in U, q\in V$,
- $(U\cap Z) \cap (V\cap Z) = \emptyset$, and
- $Z\subseteq U\cup V$
We claim that there exist $U'$ and$V'$ open in $X$ such that
- $\bar U'\subseteq U, \bar V'\subseteq V$,
- $p\in U', q\in V'$,
- $(Z\cap U')\cap(Z\cap V') = \emptyset$,
- $Z\subseteq U'\cup V'$
To see this, for each point $x\in \bd(U)$, where $\bd(U)$ means the boundary of $U$, we can find a neighborhood $O_x$ of $x$ such that $\bar O_x$ is disjoint from $Z$. Since $\bd(U)$ is compact, there exist finitely many points $x_1,\ldots, x_n$ in $\bd(U)$ such that $O_{x_1}\cup \cdots \cup O_{x_n}$ contains $\bd(U)$. Define $U' = U \setminus (\bar O_{x_1}\cup \cdots \cup \bar O_{x_n})$. By a similar procedure we construct $V'$. Then $U'$ and $V'$ satisfy the requirement of the claim.
Since $f_n$ converges uniformly to $f$ we get that $Z_n\subseteq U'\cup V'$ for each large enough $n$. By passing to a tail we may assume that $Z_n\subseteq U'\cup V'$ for each $n$. Now using the hypothesis that $p$ and $q$ are in the same component of $Z_n$, we deduce that $(U'\cap Z_n) \cap (V'\cap Z_n)$ cannot be empty. So let $x_n \in (U'\cap Z_n)\cap (V'\cap Z_n)$ be chosen for each $n$. Passing to a subsequence, we may assume that $x_n\to x$ for some $x\in X$. Then $x$ must lie in $\overline{U'\cap V'}$, and hence, in particular, it must lie in $U\cap V$.
Using $f_n(x_n) = 0$ for each $n$, and the uniform convergence of $f_n$ to $f$, we deduce that $f(x) = 0$, that is $x\in Z$. Therefore $x\in (U\cap Z) \cap (V\cap Z)$, contradicting the choice of $U$ and $V$. $\blacksquare$
Here $Z(g)$ denotes the zero set of $g$, and $d(x, A) = \inf\{d(x, y) : y\in A\}$ is the distance from $x$ to $A$.
The lemma doesn't hold if connected is replaced by path-connected:
Say $X = [-1, 1]^2$ and let $Z$ be the topologist's sine curve. Consider $f = d(\cdot, Z)$ and $f_n = \max(f-\frac{1}{n}, 0)$. That is, $f(x) = d(x, Z)$ and $f_n(x) = \max(f(x)-\frac{1}{n}, 0)$ for $x\in X$.
Topologist's sine curve is $$Z = \overline{\{(t, \sin(1/t)) : t\in (0, 1]\}} = \{0\}\times [-1, 1]\cup \{(t, \sin(1/t)) : t\in (0, 1]\} \subseteq X.$$
Clearly $Z(f) = Z$ and $\|f-f_n\| = \sup_{x\in X} |f(x)-f_n(x)| \leq \frac{1}{n}$ (since if $f(x)\leq \frac{1}{n}$ then $|f(x)-f_n(x)| = f(x) \leq \frac{1}{n}$, and if $f(x) > \frac{1}{n}$ then $|f(x)-f_n(x)| = \frac{1}{n}$) so that $f_n$ converges to $f$ uniformly. Moreover, $Z\subseteq Z(f_n)$.
However, $Z(f_n) = Z_n = \{x\in X : d(x, Z) \leq \frac{1}{n}\}$ is path-connected for all $n$, since $Z_n = \bigcup_{x\in Z} B(x, \frac{1}{n})$ where $B(x, \frac{1}{n}) = \{y\in X : d(x, y) \leq \frac{1}{n}\}$, both $\bigcup_{t \in [-1, 1]} B((0, t), \frac{1}{n})$ and $\bigcup_{t\in (0, 1]} B((t, \sin(1/t)), \frac{1}{n})$ are path-connected (the ball $B(x, r)$, $\{0\}\times [-1, 1]$ and $\{(t, \sin(1/t)) : t\in (0, 1]\}$ are all path-connected), and since, for example, in $B((0, 0), \frac{1}{n})$ we can find both elements of $\{0\}\times [-1, 1]$ and $\{(t, \sin(1/t)) : t\in (0, 1]\}$, whole $Z_n$ needs to be path-connected.
Picking $p, q$ to lie in distinct path components of $Z$, we obtain that $p, q$ don't have to lie in the same path component of $Z$, even if they do lie in the same path-component of $Z_n$ for all $n$.
Let me make some comments on the proof you included while I'm at it.
How you can obtain $U, V$ is use that quasi-components and components of the compact metric space $Z$ coincide, thus there is a clopen set $U\cap Z\subseteq Z$ of $Z$ with $p\in U\cap Z$ and $q\notin U\cap Z$, taking $Z\setminus U$ and extending it to open set $V$ of $X$, we get what we desired.
For the existence of $U', V'$ all those things are unnecessary, just use that $Z\cap U\subseteq U$ and $Z\cap U$ is closed. Applying normality of $X$, we find $U'$. Similarly we find $V'$.
As for $Z_n\subseteq U'\cup V'$ for large enough $n$, this follows since if it were $Z_n\cap (U'\cup V')^c\neq\emptyset$ for infinite amount of $n$, then from compactness we can assume (by omitting the unnecessary $Z_n$) that there is a sequence $x_n\to x$ such that $f_n(x_n) = 0$ and $x_n, x\notin U'\cup V'$, so $f_n(x_n)\to f(x) = 0$, contradiction.
The proof looks overall correct, but it missed justification for above details.