I am going to assume the reader is familiar with the (contour-ordered) definition of the Green's function:
$$\begin{align}
iG(t_1,t_2) &\equiv \langle T_c \psi_H(x_1,t_1) \psi^\dagger_H(x_2,t_2) \rangle \\
&\equiv \mathop{Tr}\left[\rho(H) T_c \psi_H(x_1,t_1) \psi^\dagger_H(x_2,t_2) \right] / \mathop{Tr}\left[\rho(H) \right]
\end{align}
$$
where $\psi_H$ is the annihilation operator in the Heisenberg picture, whose evolution is dictated by the time evolution operator $U$, starting from some time $t_0$, where the Heisenberg and Schrodinger pictures coincide.
$$
\psi_H(x,t) = U^\dagger(t,t_0) \psi(x) U(t,t_0)
$$
Now here's the proof:
$$\begin{align}
\frac{d}{dt}U_{H}\left(t,t_{0}\right)&=-iH\left(t\right)U_{H}\left(t,t_{0}\right)\\
S\left(t\right)&\equiv U_{H}\left(t+T,t_{0}\right)U_{H}^{\dagger}\left(T,t_{0}\right)\quad\text{define helper quantity}\\
\frac{d}{dt}S\left(t\right)&=\frac{d}{dt}U_{H}\left(t+T,t_{0}\right)U_{H}^{\dagger}\left(T,t_{0}\right)\\&=-iH\left(t+T\right)U_{H}\left(t+T,t_{0}\right)U_{H}^{\dagger}\left(T,t_{0}\right)\\&=-iH\left(t\right)S\left(t\right)\quad\text{using periodicity of }H\\
\Rightarrow S\left(t\right)&=U_{H}\left(t,t_{0}\right)U_{H}^{\dagger}\left(0,t_{0}\right)\quad\text{because }S\left(0\right)=1\\\Rightarrow U_{H}\left(t+T,t_{0}\right)&=U_{H}\left(t,t_{0}\right)U_{H}^{\dagger}\left(0,t_{0}\right)U_{H}\left(T,t_{0}\right)\\&=U_{H}\left(t,t_{0}\right)X\\\text{where }X&\equiv U_{H}^{\dagger}\left(0,t_{0}\right)U_{H}\left(T,t_{0}\right)\\
\text{now } \psi_{H}\left(x,t+T\right)&=U_{H}^{\dagger}\left(t+T,t_{0}\right)\psi\left(x,t_{0}\right)U_{H}\left(t+T,t_{0}\right)\\
&=X^{\dagger}U_{H}^{\dagger}\left(t,t_{0}\right)\psi\left(x,t_{0}\right)U_{H}\left(t,t_{0}\right)X\\
&=X^{\dagger}\psi_{H}\left(x,t\right)X\\
iG\left(t_{1}+T,t_{2}+T\right)&=\left\langle T_{c}\psi_{H}\left(x_{1},t_{1}+T\right)\psi_{H}^{\dagger}\left(x_{2},t_{2}+T\right)\right\rangle \\&=\left\langle T_{c}X^{\dagger}\psi_{H}\left(x_{1},t_{1}\right)XX^{\dagger}\psi_{H}^{\dagger}\left(x_{2},t_{2}\right)X\right\rangle \\&=\left\langle T_{c}X^{\dagger}\psi_{H}\left(x_{1},t_{1}\right)\psi_{H}^{\dagger}\left(x_{2},t_{2}\right)X\right\rangle \\&=\left\langle T_{c}\psi_{H}\left(x_{1},t_{1}\right)\psi_{H}^{\dagger}\left(x_{2},t_{2}\right)XX^{\dagger}\right\rangle \quad\text{using cyclic property of trace}\\&=\left\langle T_{c}\psi_{H}\left(x_{1},t_{1}\right)\psi_{H}^{\dagger}\left(x_{2},t_{2}\right)\right\rangle \\&=iG\left(t_{1},t_{2}\right)
\end{align}
$$
q.e.d.