The answer is no: unless $G$ is compact, its subspace topology inside $bG$ (called its Bohr topology) is much weaker than its own. So $\beta:G\to bG$$\iota:G\to bG$, while continuous with dense image, is not an embedding (homeomorphism onto $\beta(G)$$\iota(G)$), hence not a compactification in the sense of topologists.
Rudin (1962, pp. 30-31) notes this without proof. Later Katznelson (1973) gave a method to show that very “thin” subsets of $G$ are dense in the Bohr topology: e.g. $\mathbf N$ inside $\mathbf Z$, a parabola inside $\smash{\mathbf R^2}$, etc. For more details and references see (with apologies for the plug) this paper, esp. Lemma 1(4).
Note: I have restricted my answer to abelian $G$; $\beta$$\iota$ can be defined for any topological group, but your question only makes sense when $\beta$$\iota$ is injective, i.e. for “maximally almost-periodic” $G$, and these are very nearly the compact $\times$ abelian ones: see Dixmier (1977, §§16.1, 16.4).