Condition of ordinary differential equation to have a periodic solution
Let $T>$ be the period of $f$ as a function of $t$, i.e. $f(t+T,x)=f(t,x)$. Given $\xi\in\mathbb{R}$, let $x(t,\xi)$ be the unique solution of $x'=f(t,x)=$ such that $x(0)=\xi$. Then $$ x(t,x(T,\xi))=x(t+T,\xi). $$ In particular, if $x(T,\xi)=\xi$, then $x(t,\xi)$ is periodic of period $T$.
Define $F\colon\mathbb{R}\to\mathbb{R}$ by $F(\xi)=x(T,\xi)$. The results of continuous dependence of initial values for ODE's show that $F$ is continuous. Moreover, $x(t,\xi)$ is periodic of period $T$ if and only if $F(\xi)=\xi$. Thus, to show the existence of periodic solutions, it is enough to prove that $F$ has fixed points. For this, we will show that there is a finite closed interval $[a,b]$ such that $F([a,b])\subset[a,b]$.
Let $a=\inf\{\psi(0),\psi(T),\psi(2\,T),\dots\}$ and $b=\sup\{\psi(0),\psi(T),\psi(2\,T),\dots\}$; the condition on $\psi$ implies that $a$ and $b$ are finite. If $a=b$, then $\psi$ is constant, and hence periodic. Assume $a<b$. Given $\xi\in(a,b)$, there exist $m,n$ such that $\psi(m\,T)<\xi<\psi(n\,T)$. By uniqueness of solutions $$ F(\xi)=x(T,\xi)<x(T,\psi(k\,T))=x(T+k\,T,\psi(0))=\psi((k+1)T)\le b. $$ Similarly, $F(\xi)\ge a$. Since $F$ is continuous, it follows that $F([a,b])\subset[a,b]$.