In general (for any topological space $X$ at all), $\mathbf{X}$ is the Stone-Cech compactification of $X$. That is, there is a canonical continuous map $i:X\to\mathbf{X}$ such that for every compact Hausdorff space $K$ and every continuous map $f:X\to K$, there is a unique continuous map $g:\mathbf{X}\to K$ such that $gi=f$. (Explicitly, $\mathbf{X}$ is the space of $*$-homomorphisms $C(X)\to\mathbb{C}$, and $i:X\to\mathbf{X}$ takes any $x\in X$ to the homomorphism given by evaluation at $x$.)
Now, the Stone-Cech compactification is not always a compactification in your sense. Specifically, it is a compactification (embedding with dense open image) iff $X$ is locally compact and Hausdorff. This condition is obviously necessary, since any open subspace of a compact Hausdorff space is locally compact Hausdorff. Conversely, the image of $i$ is always dense, and $i$ is an embedding iff $X$ is completely regular. In particular, if $X$ is locally compact Hausdorff then $i$ is a embedding with dense image and its image is therefore open since any dense locally compact subspace of a compact Hausdorff space is open.
As for what you call $C_b(X)$, it is just $C(X_d)$ where $X_d$ is $X$ with the discrete topology. So, the $\mathbf{X}$ you obtain from this is just the Stone-Cech compactification of $X_d$. This will never be a compactification of $X$ in a canonical way unless $X$ is discrete so that $X=X_d$ (in particular, the canonical map $i:X\to\mathbf{X}$ is not continuous with respect to any topology on $X$ besides the discrete topology, since it is an embedding with respect to the discrete topology).
(Incidentally, what you call $C(X)$ is what is more commonly called $C_b(X)$. Typically $C(X)$ refers to the algebra of all (not necessarily bounded) continuous functions on $X$.)
Best Answer
The first result that you stated is commonly known as the Gelfand-Naimark-Segal Theorem. It is true for arbitrary C*-algebras, and its proof employs a technique known as the GNS-construction. This technique basically allows one to construct a Hilbert space $ \mathcal{H} $ from a given C*-algebra $ \mathcal{A} $ such that $ \mathcal{A} $ can be isometrically embedded into $ B(\mathcal{H}) $ as a C*-subalgebra.
The Gelfand-Naimark Theorem, on the other hand, states that every commutative C*-algebra $ \mathcal{A} $, whether unital or not, is isometrically *-isomorphic to $ {C_{0}}(X) $ for some locally compact Hausdorff space $ X $. When $ X $ is compact, $ {C_{0}}(X) $ and $ C(X) $ become identical.
Note: The assumption of commutativity is essential for stating the Gelfand-Naimark Theorem. This is because we cannot realize a non-commutative C*-algebra as the commutative C*-algebra $ {C_{0}}(X) $, for some locally compact Hausdorff space $ X $.
What follows is a statement of the Gelfand-Naimark Theorem, with the utmost level of precision.
This result is often first established for the case when $ \mathcal{A} $ is unital. One basically tries to show that the compact Hausdorff space $ X $ can be taken to be the set $ \Sigma $ of all non-zero characters on $ \mathcal{A} $, where $ \Sigma $ is equipped with a special topology. Here, a character on $ \mathcal{A} $ means a linear functional $ \phi: \mathcal{A} \to \mathbb{C} $ satisfying $ \phi(xy) = \phi(x) \phi(y) $ for all $ x,y \in \mathcal{A} $. A rough outline of the proof is given below.
Show that every character has sup-norm $ \leq 1 $. Hence, $ \Sigma \subseteq {\overline{\mathbb{B}}}(\mathcal{A}^{*}) $, where $ {\overline{\mathbb{B}}}(\mathcal{A}^{*}) $ denotes the closed unit ball of $ \mathcal{A}^{*} $.
Equip $ {\overline{\mathbb{B}}}(\mathcal{A}^{*}) $ with the subspace topology inherited from $ (\mathcal{A}^{*},\text{wk}^{*}) $, where $ \text{wk}^{*} $ denotes the weak*-topology. By the Banach-Alaoglu Theorem, $ {\overline{\mathbb{B}}}(\mathcal{A}^{*}) $ then becomes a compact Hausdorff space.
Prove that $ \Sigma $ is a weak*-closed subset of $ \left( {\overline{\mathbb{B}}}(\mathcal{A}^{*}),\text{wk}^{*} \right) $. Hence, $ \Sigma $ becomes a compact Hausdorff space with the subspace topology inherited from $ \left( {\overline{\mathbb{B}}}(\mathcal{A}^{*}),\text{wk}^{*} \right) $.
For each $ a \in \mathcal{A} $, define $ \hat{a}: \Sigma \to \mathbb{C} $ by $ \hat{a}(\phi) \stackrel{\text{def}}{=} \phi(a) $ for all $ \phi \in \Sigma $. We call $ \hat{a} $ the Gelfand-transform of $ a $.
Show that $ \hat{a} $ is a continuous function from $ (\Sigma,\text{wk}^{*}) $ to $ \mathbb{C} $ for each $ a \in \mathcal{A} $. In other words, $ \hat{a} \in C((\Sigma,\text{wk}^{*})) $ for each $ a \in \mathcal{A} $.
Finally, prove that $ a \longmapsto \hat{a} $ is an isometric *-isomorphism from $ \mathcal{A} $ to $ C((\Sigma,\text{wk}^{*})) $.
Let us now take a look at the following theorem, which the OP has asked about.
One actually does not require the Gelfand-Naimark Theorem to prove this result. Let us see a demonstration.
Proof
The forward direction is trivial. Take a homeomorphism $ h: X \to Y $, and define $ h^{*}: C(Y) \to C(X) $ by $ {h^{*}}(f) \stackrel{\text{def}}{=} f \circ h $ for all $ f \in C(Y) $. Then $ h^{*} $ is an isometric *-isomorphism.
The other direction is non-trivial. Let $ \Sigma_{X} $ and $ \Sigma_{Y} $ denote the set of non-zero characters of $ C(X) $ and $ C(Y) $ respectively. As $ C(X) $ and $ C(Y) $ are isomorphic C*-algebras, it follows that $ \Sigma_{X} \cong_{\text{homeo}} \Sigma_{Y} $. We must now prove that $ X \cong_{\text{homeo}} \Sigma_{X} $. For each $ x \in X $, let $ \delta_{x} $ denote the Dirac functional that sends $ f \in C(X) $ to $ f(x) $. Next, define a mapping $ \Delta: X \to \Sigma_{X} $ by $ \Delta(x) \stackrel{\text{def}}{=} \delta_{x} $ for all $ x \in X $. Then $ \Delta $ is a homeomorphism from $ X $ to $ (\Delta[X],\text{wk}^{*}) $ (this follows from the fact that $ X $ is a completely regular space). We will be done if we can show that $ \Delta[X] = \Sigma_{X} $. Let $ \phi \in \Sigma_{X} $. As $ \phi: C(X) \to \mathbb{C} $ is surjective (as it maps the constant function $ 1_{X} $ to $ 1 $), we see that $ C(X)/\ker(\phi) \cong \mathbb{C} $. According to a basic result in commutative ring theory, $ \ker(\phi) $ must then be a maximal ideal of $ C(X) $. As such, $$ \ker(\phi) = \{ f \in C(X) ~|~ f(x_{0}) = 0 \} $$ for some $ x_{0} \in X $ (in fact, all maximal ideals of $ C(X) $ have this form; the compactness of $ X $ is essential). By the Riesz Representation Theorem, we can find a regular complex Borel measure $ \mu $ on $ X $ such that $ \phi(f) = \displaystyle \int_{X} f ~ d{\mu} $ for all $ f \in C(X) $. As $ \phi $ annihilates all functions that are vanishing at $ x_{0} $, Urysohn's Lemma implies that $ \text{supp}(\mu) = \{ x_{0} \} $. Hence, $ \phi = \delta_{x_{0}} $, which yields $ \Sigma_{X} \subseteq \Delta[X] $. We thus obtain $ \Sigma_{X} = \Delta[X] $, so $ X \cong_{\text{homeo}} \Sigma_{X} $. Similarly, $ Y \cong_{\text{homeo}} \Sigma_{Y} $. Therefore, $ X \cong_{\text{homeo}} Y $ because $$ X \cong_{\text{homeo}} \Sigma_{X} \cong_{\text{homeo}} \Sigma_{Y} \cong_{\text{homeo}} Y. $$
We actually have the following general categorical result.
The role of the Gelfand-Naimark Theorem in this result is to prove that $ \mathcal{F} $ is an essentially surjective functor, i.e., every commutative C*-algebra can be realized as $ \mathcal{F}(X) = C(X) $ for some $ X \in \textbf{CompHaus} $.