Let $f \colon [a,b] \to \mathbb{R}$ be a function. Recall that $f$ is Lipschitz continuous if and only if there is some constant $C > 0$ such that
$$\lvert f(x_2) - f(x_1) \rvert < C \lvert x_2 - x_1 \rvert.$$
In what follows, we say that $f$ has the closed subintervals property if and only if, for every $\varepsilon > 0$, there exists $\delta > 0$ such that
$$\sum_{k=1}^n \lvert f(b_k) - f(a_k) \rvert < \varepsilon$$
for any collection of $n$ closed subintervals of $[a,b]$ $(n \in \mathbb{N})$.
So, we want to prove that $f$ is Lipschitz continuous if and only if $f$ has de closed subintervals property.
$(\Longrightarrow)$ Suppose that $f$ is Lipschitz continuous. By definition, there is a constant $C > 0$ such that
$$\lvert f(x_2) - f(x_1) \rvert < C \lvert x_2 - x_1 \rvert$$
for any $x_1, x_2 \in [a,b]$. Let $\varepsilon$ be an arbitrary positive real number.
Hint. If we take any collection $\{[a_k,b_k]\}_{k=1}^n$ of $n$ closed subintervals of $[a,b]$ $(n \in \mathbb{N})$, what can be said about the value of
$$\sum_{k=1}^n \lvert f(b_k) - f(a_k) \rvert < \varepsilon$$
given that $\lvert f(b_k) - f(a_k) \rvert < C (b_k - a_k)$, for each $k = 1, \dots, n$?
(The rest of the proof is hidden in the following block).
Take $\delta := \varepsilon/C > 0$, and let $\{[a_k,b_k]\}_{k=1}^n$ be any collection of $n$ closed subintervals of $[a,b]$ $(n \in \mathbb{N})$ such that $\sum_{k=1}^n (b_k - a_k) < \delta$. Hence, $$\sum_{k=1}^n \lvert f(b_k) - f(a_k) \rvert \leq \sum_{k=1}^n C \lvert b_k - a_k \rvert = C \sum_{k=1}^n (b_k - a_k) < C \delta = \varepsilon.$$
$(\Longleftarrow)$ Suppose that $f$ is not Lipschitz continuous.
Hint. This means that, for every constant $C > 0$, there are $x_1, x_2 \in [a,b]$, such that
$\lvert f(x_2) - f(x_1) \rvert \geq C \lvert x_2 - x_1 \rvert$. So, for an arbitrary “tiny” subinterval of $[a,b]$ the absolute value of the difference between the images of its endpoints can be “large”.
(As above, the rest of the proof is hidden in the following block).
Take $\varepsilon := 1 > 0$. Let $\delta$ be an arbitrary positive real number. By hypothesis, there are $x_1, x_2 \in [a,b]$ such that $$\lvert f(x_2) - f(x_1) \rvert \geq \frac{\lvert x_2 - x_1 \rvert}{\lvert b - a \rvert + 1}.$$ Without loss of generality, assume that $x_1 \leq x_2$. Take $a_1 := x_1$ and $a_2 := \min\{x_2,x_1 + \delta/2\}$. Note that $\{[a_1,b_1]\}$ is a collection of a closed subinterval of $[a,b]$. Moreover, we have that $\lvert b_1 - a_1 \rvert < \delta$. However, as $\lvert b_1 - a_1 \rvert \leq \lvert b - a \rvert$,$$\lvert f(b_1) - f(a_1) \rvert \geq \frac{b_1 - a_1}{\lvert b - a \ + 1} \geq 1 = \varepsilon.$$ Hence, we proved that there exists $\varepsilon > 0$ such that, for every $\delta > 0$, there is a collection $\{[a_k,b_k]\}_{k=1}^n$ of $n$ closed subintervals of $[a,b]$ $(n \in \mathbb{N})$ with $$\sum_{k=1}^n (b_k - a_k) < \delta \quad \text{and} \quad \sum_{k=1}^n \lvert f(b_k) - f(a_k) \rvert \geq \varepsilon.$$ Therefore, $f$ does not have the closed subinterval property and this concludes our proof. $\square$