I've been trying to prove this using Hilbert's Irreducibility Theorem for a while now. I have proved the case for $k=2$ as follows: Suppose $g(x)\in\mathbb{Z}[x]$ is a perfect square for all integer values $x$. Let $f(x,t)=y^{2}-g(x)$. Note that we either have that $f$ is irreducible, in which case we have $$f(x,y)=y^{2}-g(x)$$ or $f$ is reducible, giving $$f(x,y)=(y-A(x))(y-B(x))$$ for some functions $A(x),B(x)\in\mathbb{Z}[x]$. Expanding out the latter case we get the following: \begin{equation*} \begin{split} y^{2}-g(x) & = (y-A(x))(y-B(x)) \\ & = y^{2}-(A(x)+B(x))y+A(x)B(x). \end{split} \end{equation*} Comparing $y$ coefficients we deduce that $A(x)=-B(x)$, thus \begin{equation*} \begin{split} y^{2}-g(x) & = (y-A(x))(y-A(x)) \\ & = y^{2}+A^{2}(x) \end{split} \end{equation*} $$\implies g(x)=A^{2}(x)$$ Now suppose $f(x,y)=y^{2}-g(x)$ is irreducible. Then by Hilbert's Irreducibility Theorem there exist infinite $x_{0}$ such that $f(x_{0},y)=y^{2}-g(x_{0})$ is irreducible in $\mathbb{Q}[y]$. By definition of $g(x)$ we have that $g(x_{0})=a_{0}^{2}$ for some $a_{0} \in \mathbb{Z}$ and hence $$f(x_{0},y)=y^{2}-a_{0}^{2}=(y-a_{0})(y+a_{0})$$ which is reducible in $\mathbb{Z}[y]$ giving a contradiction. Thus $g(x)=h^{2}(x)$ for some $h(x)\in \mathbb{Z}[x]$
When trying to generalise this to higher $k$, I can only seem to get a result if $y^{k}-g(x)$ has a linear factor in $y$, i.e. $$f(x,y)=(y-h(x))(y^{k-1}+g_{k-2}(x)y^{k-2}+\ldots+g_{1}(x)y+g_{0}(x))$$ for some $h(x),g_{i}(x)\in \mathbb{Z}[x]$. We can then use induction to find $g(x)=h^{k}(x)$. My arguement seems to break down for $k=4$ as if $$y-g(x)=(y^{2}+A(x)y+B(x))(y^{2}+C(x)y+D(x))$$ Then we find $g(x)=B^{2}(x)$ but this does not seem to show that $g(x)$ is a 4th power of another polynomial. Is my method too specific to generalise this for $k=5$ and above or am I just missing a trick to make the whole proof fit together? Other answers on here have refered to the paper "Polynomials of certain special types" by Davenport, Lewis, Schinzel but the results in this are slightly too general to help with my understanding of this problem.