Suppose the opposite, that is :
$$\exists\epsilon>0;\forall\delta>0,\exists(x,y)\in[a,b]^2;|x-y|\le\delta\,\,\mathrm{and}\,\,|f(x)-f(y)|>\epsilon$$
We can choose whatever $\delta$ we wish ... Let's take $\delta=\frac1n$, for any positive integer $n$.
There exists $(x_n,y_n)\in[a,b]^2$ such that :
$$|x_n-y_n|\le\frac1n\quad\mathrm{and}\quad|f(x_n)-f(y_n)|>\epsilon$$
By the Bolzano-Weierstrass theorem, we can extract from $(x_n)_{n\ge1}$ a convergent subsequence $(x_{n_k})_{k\ge1}$, which converges to some $u\in[a,b]$.
We observe that, for every $k\in\mathbb{N}^\star$, we have : $|x_{n_k}-y_{n_k}|\le\frac1{n_k}\le\frac1k$. This implies that $(y_{n_k})_{k\ge1}$ also converges to $u$.
By continuity of $f$, we know that :
$$\lim_{k\to\infty}f(x_{n_k})=\lim_{k\to\infty}f(y_{n_k})=f(u)$$
But this leads to $|f(x_{n_k})-f(y_{n_k})|\le\epsilon$ as soon as $k\ge N$ for some convenient $N$. A contradiction !
Finally, we have proved that :
$$\forall\epsilon>0,\exists\delta>0;\forall(x,y)\in[a,b]^2;|x-y|\le\delta\implies|f(x)-f(y)|\le\epsilon$$