You are correct that it is the same as saying that $T$ is not bijective, because it follows from the open mapping theorem that a bounded operator on a Banach space has a bounded inverse if it is bijective. However, more straightforward answers for your question can be given without explicitly thinking in these terms.
You can show that if $T$ is compact and $S$ is bounded, then $ST$ is compact. If $T$ were invertible, this would imply that $I=T^{-1}T$ is compact. This in turn translates to saying that the closed unit ball of $X$ is compact. One way to see that this is impossible in the infinite dimensional case is implicit in this question. There is an infinite sequence of points in the unit ball whose pairwise distances are bounded below, no subsequence of which is Cauchy.
Compact operators on infinite dimensional spaces can be injective, but they can never be surjective. The closed subspaces of the range of a compact operator are finite dimensional.
Also, what Qiaochu said in his comment above.
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
By popular request ^^ this comment is made into an answer.
Jonas has already given an answer, but here's another one. You can remember that in the context of Banach spaces (or more generally complete metrizable topological vector spaces), surjective (continuous) linear maps are automatically open. Thus you would have $$c B_X\subset A(B_X)$$ where $c$ is a positive real number and $B_X$ is the unit ball in $X$. The left hand side has compact closure iff $X$ is finite dimensional by a theorem of Riesz, while the right hand side has compact closure by definition of $A$ being compact. So $X$ must be finite dimensional for $A$ to be compact and surjective.