[step:Show that the path image is connected]
Let $Y:=\gamma([0,1])\subset X$ be the image of the path.
[claim:The interval $[0,1]$ is connected]
[/claim]
[proof]
Suppose $[0,1]=A\cup B$, where $A$ and $B$ are disjoint nonempty open subsets of $[0,1]$ in the subspace topology. Choose $a\in A$ and $b\in B$. If $b<a$, interchange the names of $A$ and $B$, so assume $a<b$. Define
\begin{align*}
S:=\{t\in[a,b]:[a,t]\subset A\}.
\end{align*}
Since $a\in A$ and $A$ is open in $[0,1]$, there exists $\varepsilon>0$ such that $[0,1]\cap(a-\varepsilon,a+\varepsilon)\subset A$. Hence $S$ is nonempty. Since $S\subset[a,b]$, the number $c:=\sup S$ exists and satisfies $a\leq c\leq b$.
If $c\in B$, then because $B$ is open in $[0,1]$, there exists $\delta>0$ such that $[0,1]\cap(c-\delta,c+\delta)\subset B$. Since $c=\sup S$, there exists $s\in S$ with $c-\delta<s\leq c$. Then $s\in A\cap B$, contradicting $A\cap B=\varnothing$.
Thus $c\in A$. Since $A$ is open in $[0,1]$, there exists $\eta>0$ such that $[0,1]\cap(c-\eta,c+\eta)\subset A$. Because $b\in B$, we have $c<b$. Choose $r\in\mathbb{R}$ with $c<r<\min\{b,c+\eta\}$. From $c=\sup S$, choose $s\in S$ with $c-\eta<s\leq c$. Then $[a,s]\subset A$, and also $[s,r]\subset A$ by the choice of $\eta$. Hence $[a,r]\subset A$, so $r\in S$, contradicting $r>c=\sup S$.
Therefore no such separation of $[0,1]$ exists, and $[0,1]$ is connected.
[/proof]
Now suppose $Y=P\cup Q$, where $P$ and $Q$ are disjoint nonempty open subsets of $Y$ in the subspace topology. Since $\gamma:[0,1]\to Y$ is continuous when its codomain is restricted to $Y$, the sets $\gamma^{-1}(P)$ and $\gamma^{-1}(Q)$ are disjoint nonempty open subsets of $[0,1]$, and
\begin{align*}
[0,1]=\gamma^{-1}(P)\cup\gamma^{-1}(Q).
\end{align*}
This contradicts the connectedness of $[0,1]$. Hence $Y$ is connected.
[/step]