Your proof looks good.
Here's another possible line you could follow.
Lemma. Suppose $X,Y$ are Banach spaces, $T : X \to Y$ is continuous and injective. Then the range of $T$ is closed if and only if there is a constant $c > 0$ such that $\|Tx\| \ge c\|x\|$ for all $x\in X$ (we say such $T$ is bounded below).
Proof. For the forward direction, use the open mapping theorem. (But we don't actually need the forward direction for this problem). For the reverse direction, if $T$ is bounded below then $T^{-1}$ is bounded. So $TX = (T^{-1})^{-1} X$ is closed, being the preimage of a closed set under a continuous map.
Now for the problem: let $S$ be the unit sphere of $X$. By assumption $TS$ is closed, and by the injectivity of $T$ it does not contain 0. Hence its complement contains an open ball of some radius $c$ about 0. This means that $\|Tx\| \ge c\|x\|$ for all $x \in S$, and by linearity the same holds for all $x \in X$. So $T$ is bounded below, and by our lemma it has closed range.
Consider the operator $T\colon \ell^2\to \ell^2$ defined by
$$ T\mathbf{x}=\left(0, \frac{x_2}{2}, \frac{x_3}{3}\ldots\right).$$
$T$ is not injective because $T\mathbf{e}_1=0$, but it is compact and its range is the subspace
$$E=\left\{\mathbf{y}\in \ell^2\ :\ y_1=0,\ (ny_n)\in \ell^2.\right\}.$$
The subspace $E$ is dense in $M=\overline{\mathrm{span}}\{\mathbf{e}_2, \mathbf{e}_3\ldots\}$, because it contains $\{\mathbf{e}_2, \mathbf{e}_3, \ldots\}$, but the inclusion $E\subset M$ is proper. For example, the sequence
$$\mathbf{x}=\begin{cases}
0, & n=1 \\
\frac{1}{n}, & n \ge 2
\end{cases}$$
does not belong to $E$. Therefore $E$ is not closed in $M$, hence it is not closed in $\ell^2$ too.
P.S. In comments the OP requested an example in $C([0,1])$ space. This of course is more complicated because we have now left the elementary Hilbert space setting. Indeed, I am not able to furnish an example, nor I think that a natural example exists. Let me explain what natural means to me in this context.
The typical examples of compact operators in $C([0,1])$ space are integral transforms
$$Tf=\int_0^1 K(x, y) f(y)\, dy. $$
In turn, integral transforms usually arise as solution operators to linear boundary value problems for ODEs:
$$\begin{cases} Lu = f, & x\in (0, 1) \\ U(u)=0\end{cases}$$ Here $L$ is a symmetric linear differential operator and $U(u)=0$ denotes the boundary conditions. (Notation is taken from Coddington-Levinson's book on ordinary differential equations, chapter 7). Now such an operator is always injective, as $Tf=0$ means that the solution to the boundary value problem is the null function $u=0$, which forces $f=Lu=L0=0$. So an example cannot come from there.
There are also integral transforms $T$ that do not come from a boundary value problem, of course. However, the typical examples here have splitting kernel:
$$K(x, y)=\sum_{j=1}^J a_j(x)b_j(y). $$
This splitting leads to operators with finite dimensional range. So an example cannot come from there either.
That's what I meant with natural above. But there are a lot more compact operators on $C([0, 1])$. I am sure that an example of an operator which is compact, not injective, and not finite rank can be easily crafted, perhaps with tools of abstract functional analysis (such as Schauder bases).
Best Answer
Suppose $T^{-1}$ is bounded. Then for some $M>0$ we have $\|T^{-1}y\|\leq M\|y\|$ for all $y\in R(T)$. This implies that $T$ is bounded below, which implies $R(T)$ is closed. In case you're not familiar with this result, I'll include a proof:
Suppose $(y_n)$ is a Cauchy sequence in $R(T)$, and write $x_n=T^{-1}y_n$. Given $\varepsilon>0$, there is some $N\in\mathbb N$ such that $\|y_n-y_m\|<\varepsilon/M$ for $n,m\geq N$. Then $$\|x_n-x_m\|\leq M\|y_n-y_m\|<\varepsilon$$ for $n,m\geq N$, so $(x_n)$ is Cauchy, and thus convergent to some $x\in X$. Put $y=Tx$. Now there is some $N\in\mathbb N$ such that $\|x_n-x\|<\varepsilon/\|T\|$ for all $n\geq N$, and thus $$\|y_n-y\|\leq\|T\|\|x_n-x\|<\varepsilon$$ for $n\geq N$, and thus $y_n\to y$. Thus $R(T)$ is complete, and therefore closed.