I'll write something, probably incomplete, and hopefully someone more capable than I will fill in the gaps.
Let's start at the beginning: number fields are finite extensions of the rational field $\mathbb Q$. For every such extension $K/\mathbb Q$, we can associate a group, called the class group, which more or less measure how close the ring of integers in $K$ is to being a Unique Factorization Domain. In particular, when we talk of abelian extensions of $\mathbb Q$, we mean that the class group the Galois group $\mathrm{Gal}(K/\mathbb Q)$ is an abelian group.
Now, it turns out that the abelian extensions of $\mathbb Q$ have a very nice characterization, through the Kronecker-Weber theorem:
All abelian extensions of $\mathbb Q$ are subfields of a cyclotomic field $\mathbb Q(\zeta_n)/\mathbb Q$.
The problem is that, this only holds for abelian extensions of the rationals. The next question number theorists in the 19th century tried to answer is:
How can we extend this to the next simplest case, that of quadratic fields?
Recall that all quadratic extensions of $\mathbb Q$ are of the form $\mathbb Q(\sqrt{d})$, where $d$ is a square-free integer. If it is positive we get a real quadratic field; if it is negative, an imaginary quadratic field. The theory of complex multiplication is therefore a way to generalize the Kronecker-Weber theorem to imaginary quadratic fields. But you may ask, where do the elliptic curves come in? Through the following theorem:
Let $E$ be an elliptic curve over $\mathbb C$. Then the ring of endomorphisms of $E$ is either $\mathbb Z$ or isomorphic to an order in an imaginary quadratic field.
Therefore, elliptic curves with CM (i.e. whose ring of endomorphisms is larger than $\mathbb Z$) are connected to imaginary quadratic fields. Moreover, for any such field and any order $\mathcal O$ in it, there exists an elliptic curve $E$ such that $End(E)\cong\mathcal O$. And this is, somehow, the first step in generating all abelian extensions of imaginary quadratic fields (bit to go further would need class field theory).
In conclusion: the reason why Hilbert was so fond of the theory of Complex Multiplication is probably that it gives a rather elegant solution to the problem of "extending" the Kronecker-Weber theorem to imaginary quadratic fields.