It is easier to prove a more general statement.
Consider $X$ a locally compact metric space, $G$ a group of isometries such that there exists a compact subset $K\subset X$ with
$G\cdot K = X$. Let $f$ be a continuous $G$-periodic function from $X$ to another metric space $Y$. Then $f$ is uniformly continuous.
Proof:
Consider $\tilde K\supset K$ a compact neighborhood (it exists since $X$ is locally compact). Then $\Delta \colon = d(K, X\backslash \tilde K) >0$. Take $\epsilon>0$ arbitrary. There exists $\delta= \delta({\epsilon})>0$ such that $\tilde x_1$, $\tilde x_2$ in $\tilde K$, $d(\tilde x_1,\tilde x_2)< \delta$ implies $d(f(\tilde x_1), f(\tilde x_2)) < \epsilon$. Let us show that $\delta'= \min(\delta, \Delta)$ works for $f$ on the whole $X$. Indeed, consider now $x_1$, $x_2$ in $X$ such that $d(x_1, x_2) < \delta'$. Let $g \in G$ such that $\tilde x_1 = g x_1 \in K$. Since $d(x_1, x_2) = d(gx_1, gx_2)$, we get $d(\tilde x_1, \tilde x_2) < \delta'\le \Delta$, so $\tilde x_2 \in \tilde K$. Now we also have $d(\tilde x_1, \tilde x_2) < \delta$, so $d(f(\tilde x_1), f(\tilde x_2)) < \epsilon$. But note that $f(x_i) = f(\tilde x_i)$. We are done.
Comment: the idea is: translate one of the points $x_i$ to the compact fundamental domain. Under the same translation, the other point will fall in the compact neighborhood of the fundamental domain. Now use the uniform compactness of $f$ on $\tilde K$. So for the original problem, consider $K=[0,p]$, $\tilde K= [-\Delta, p+\Delta]$.