[step:Show that every path component is path-connected, hence connected]Let $P$ be a path component of $X$. By definition, $P$ is the equivalence class of some point $x_0 \in X$ under the relation "$x \sim y$ if and only if there exists a continuous map $\gamma: [0,1] \to X$ with $\gamma(0) = x$ and $\gamma(1) = y$." In particular, for any two points $x, y \in P$, there exist continuous maps $\gamma_1: [0,1] \to X$ with $\gamma_1(0) = x_0$, $\gamma_1(1) = x$ and $\gamma_2: [0,1] \to X$ with $\gamma_2(0) = x_0$, $\gamma_2(1) = y$.
Define the concatenation
\begin{align*}
\gamma: [0,1] &\to X \\
t &\mapsto \begin{cases} \gamma_1(1 - 2t) & \text{if } t \in [0, \tfrac{1}{2}], \\ \gamma_2(2t - 1) & \text{if } t \in [\tfrac{1}{2}, 1]. \end{cases}
\end{align*}
The map $\gamma$ is continuous by the pasting lemma (the two restrictions agree at $t = \tfrac{1}{2}$ since $\gamma_1(0) = x_0 = \gamma_2(0)$), and satisfies $\gamma(0) = \gamma_1(1) = x$ and $\gamma(1) = \gamma_2(1) = y$. Therefore $P$ is path-connected.
Since $[0,1]$ is connected and paths are continuous maps from $[0,1]$ into $X$, each path image $\gamma([0,1])$ is connected by the [Continuous Image of a Connected Space is Connected](/theorems/296) theorem. For any $x \in P$, choose a path $\gamma_x: [0,1] \to X$ from $x_0$ to $x$. Then
\begin{align*}
P = \bigcup_{x \in P} \gamma_x([0,1]).
\end{align*}
Each set $\gamma_x([0,1])$ is connected and contains $x_0$, so their union is connected (a union of connected sets with a common point is connected).[/step]