This is a simple consequence of Fredholm alternative: for a compact operator $T$, then a value $\lambda \neq 0$ is either an eigenvalue or is in the resolvent. In this case, you're interested in $\lambda = 1$. In fact the theorem is even stronger: it states that $\lambda I - T$ is injective iff it's surjective, which is exactly your question.
Since you might be interested in a proof (which isn't short), instead of copying all of it here, you can find it in "A simple proof of the Fredholm alternative " for example, proposition 1. The proof is only given in the case of an approximable operator (which is always the case in Hilbert spaces, for example), but it's true in general.