This is just the special case $\rm\, i= 1\:$ of the Easy $\rm\,k$'th power criterion derived below.
This criterion has a simple conceptual proof (alas, often overlooked). Suppose that we know that $\rm\, g^n = 1,\, $ so exponents on $\rm\,g\,$ can be interpreted $\rm\,mod\ n\!:\, i \equiv m\:$ $\Rightarrow$ $\rm\,g^i = g^{m}.\ $ We, $ $ consequently, $ $
see clearly that $\rm\,g^i\,$ is a $\rm\,k$'th power if $\rm\ mod\ n\!:\, k\mid i,\:$ i.e. $\rm\ i\equiv jk,\,$ so $\rm\,g^i = g^{jk} = (g^j)^k.\,$ By $\rm\color{#C00}{Bezout}$
$$\rm k\,|\, i\:\ (mod\ n)\!\iff\! \exists\,j\!:\ jk\equiv i\:\ (mod\ n)\!\iff\! \exists\, j,m\!:\ jk \!+\! mn = i\color{#C00}{\!\iff\!} (k,n)\,|\, i$$
Hence we have conceptually derived a proof of the following
Theorem $\rm\ \ \ g^n = 1,\,\ (k,n)\mid i\:\Rightarrow\: g^i\,$ is a $\rm\,k$'th power $\ \ $ [Easy $\rm\,k$'th Power Criterion]
Proof $\rm\ \ By\ Bezout,\,\ (k,n)\mid i\:\Rightarrow\:k\mid i\,\ (mod\ n) \Rightarrow\:i\equiv jk\,\ (mod\ n)\Rightarrow\: g^i = g^{jk} = (g^j)^k$
Note $\,\ $ That $\rm\ \ k\,|\, i\:\ (mod\ n)\!\iff\! (k,n)\,|\, i\ \ $ frequently proves conceptually handy, $ $ e.g. see here. $\ $ The reason behind this will become clearer when one studies cyclic groups and (principal) ideals.