From Orthogonality to DTFT
Here a few hints to get you started:


Define a sequence $x[k]=\langle g_n, g_{n-k} \rangle$ and write it as a convolution. From that it should be easy to find its DTFT $X(e^{j\omega})$ in terms of $G(e^{j\omega})$.
Next note that the given sequence is just a downsampled version of $x[k]$, so its spectrum is an aliased version of $X(e^{j\omega})$. That's how you end up with those two terms on the left-hand side of the frequency-domain representation.