[proofplan]
We convert the contour integral into the endpoint value of an accumulated logarithmic derivative along the path. Exponentiating this accumulated integral cancels the motion of $\gamma(t)-z_0$, producing a function that is constant on each smooth piece and therefore constant on the whole interval. The closedness condition then forces the exponential of the full integral to be $1$, and the elementary description of the kernel of the complex exponential gives that the integral is an integer multiple of $2\pi i$.
[/proofplan]
[step:Choose a smooth partition and define the accumulated logarithmic derivative]
Since $\gamma$ is piecewise $C^1$, choose a partition
\begin{align*}
a=t_0<t_1<\cdots<t_m=b
\end{align*}
such that the restriction $\gamma|_{[t_{j-1},t_j]}: [t_{j-1},t_j]\to \mathbb{C}$ is $C^1$ for each $j\in\{1,\dots,m\}$. Because $z_0\notin \gamma([a,b])$, the function
\begin{align*}
q: [a,b]\to \mathbb{C}, \qquad q(t)=\gamma(t)-z_0
\end{align*}
has no zero.
Define the accumulated logarithmic derivative
\begin{align*}
F: [a,b]\to \mathbb{C}
\end{align*}
as follows. For $t\in[t_{j-1},t_j]$, set
\begin{align*}
F(t)
:=
\sum_{\ell=1}^{j-1}\int_{t_{\ell-1}}^{t_\ell}
\frac{\gamma'(s)}{\gamma(s)-z_0}\,d\mathcal{L}^1(s)
+
\int_{t_{j-1}}^t
\frac{\gamma'(s)}{\gamma(s)-z_0}\,d\mathcal{L}^1(s).
\end{align*}
Then $F$ is continuous on $[a,b]$, is $C^1$ on each open interval $(t_{j-1},t_j)$, satisfies $F(a)=0$, and for every $t\in(t_{j-1},t_j)$,
\begin{align*}
F'(t)=\frac{\gamma'(t)}{\gamma(t)-z_0}.
\end{align*}
[/step]
[step:Exponentiate to produce a constant function]
Define
\begin{align*}
H: [a,b]\to \mathbb{C}, \qquad H(t)=e^{-F(t)}(\gamma(t)-z_0).
\end{align*}
On each open interval $(t_{j-1},t_j)$, the product rule gives
\begin{align*}
H'(t)
&=
-e^{-F(t)}F'(t)(\gamma(t)-z_0)+e^{-F(t)}\gamma'(t)\\
&=
-e^{-F(t)}
\frac{\gamma'(t)}{\gamma(t)-z_0}
(\gamma(t)-z_0)
+
e^{-F(t)}\gamma'(t)\\
&=0.
\end{align*}
Hence $H$ is constant on each interval $[t_{j-1},t_j]$. Since $H$ is continuous on $[a,b]$, these constants agree across the partition points, so $H$ is constant on all of $[a,b]$.
[guided]
The purpose of $F$ is to behave like a continuous choice of logarithm for the non-vanishing path $q(t)=\gamma(t)-z_0$, at least after exponentiation. We do not assume a logarithm of $q$ exists globally; instead, we build the integral of the logarithmic derivative and show directly that it has the required effect.
Define
\begin{align*}
H: [a,b]\to \mathbb{C}, \qquad H(t)=e^{-F(t)}(\gamma(t)-z_0).
\end{align*}
This function is continuous because $F$ and $\gamma$ are continuous. On a smooth subinterval $(t_{j-1},t_j)$, both $F$ and $\gamma$ are $C^1$, so the product rule applies. Using the defining identity
\begin{align*}
F'(t)=\frac{\gamma'(t)}{\gamma(t)-z_0},
\end{align*}
we compute
\begin{align*}
H'(t)
&=
-e^{-F(t)}F'(t)(\gamma(t)-z_0)+e^{-F(t)}\gamma'(t)\\
&=
-e^{-F(t)}
\frac{\gamma'(t)}{\gamma(t)-z_0}
(\gamma(t)-z_0)
+
e^{-F(t)}\gamma'(t)\\
&=
-e^{-F(t)}\gamma'(t)+e^{-F(t)}\gamma'(t)\\
&=0.
\end{align*}
Thus $H$ is constant on each open interval $(t_{j-1},t_j)$, and therefore on each closed subinterval $[t_{j-1},t_j]$ by continuity. At a partition point $t_j$, the left-hand and right-hand constants both equal the same value $H(t_j)$, so the constants match from one subinterval to the next. Consequently $H$ is constant on the whole interval $[a,b]$.
[/guided]
[/step]
[step:Use closedness of the path to force the exponential to be one]
Since $H$ is constant and $F(a)=0$, we have
\begin{align*}
e^{-F(b)}(\gamma(b)-z_0)=H(b)=H(a)=\gamma(a)-z_0.
\end{align*}
Because $\gamma$ is closed, $\gamma(b)=\gamma(a)$. Since $\gamma(a)-z_0\neq 0$, division by $\gamma(a)-z_0$ gives
\begin{align*}
e^{-F(b)}=1.
\end{align*}
Equivalently,
\begin{align*}
e^{F(b)}=1.
\end{align*}
[/step]
[step:Identify the kernel of the complex exponential]
Write $F(b)=u+iv$ with $u,v\in\mathbb{R}$. From $e^{F(b)}=1$, we obtain
\begin{align*}
e^u(\cos v+i\sin v)=1.
\end{align*}
Taking absolute values gives $e^u=1$, hence $u=0$. Therefore $\cos v+i\sin v=1$, so $\cos v=1$ and $\sin v=0$. Hence there exists $k\in\mathbb{Z}$ such that
\begin{align*}
v=2\pi k.
\end{align*}
Thus
\begin{align*}
F(b)=2\pi i k.
\end{align*}
[/step]
[step:Divide by $2\pi i$ to obtain the winding number]
By the definition of $F$ at $b$,
\begin{align*}
F(b)
=
\int_a^b
\frac{\gamma'(t)}{\gamma(t)-z_0}\,d\mathcal{L}^1(t)
=
\int_\gamma \frac{1}{z-z_0}\,dz.
\end{align*}
Therefore
\begin{align*}
N(\gamma,z_0)
=
\frac{1}{2\pi i}F(b)
=
\frac{1}{2\pi i}(2\pi i k)
=
k.
\end{align*}
Since $k\in\mathbb{Z}$, this proves
\begin{align*}
N(\gamma,z_0)\in\mathbb{Z}.
\end{align*}
[/step]