No, a compact separable group need not be second countable and may contain ${\bf Z}$ as a dense subgroup. A simple example is a torus of infinite uncountable dimension.

So let $(1, \theta_i)_I$ be an algebraic basis of ${\bf R}$ over ${\bf Q}$.
We consider the compact group $G = ({\bf R / Z})^I$ endowed with the product topology. $G$ is separable but not second countable. This follows from the following classical results (see e.g. Dugundji, "Topology").

**Theorem**

*A product of Hausdorff spaces (each with more than a point) is second countable if and only if the product is at most countable and all spaces are second countable.*

**Theorem**

*A product of Hausdorff spaces (each with more than a point) is separable if and only if the product is at most the cardinality of the continuum and all spaces are separable.*

Now let us consider the element $\theta = (\theta_i)_{i\in I} \in G$. The group ${\bf Z}\theta$ generated by $\theta$ is dense in $G$. Indeed this comes from the following facts.

For all finite $F \subset I$, the family $(1, \theta_i)_{i\in F}$ is free over ${\bf Q}$ hence the group generated by $(\theta_i)_{i\in F}$ is dense in $({\bf R / Z})^F$.

An open set in $G$ contains a pullback (via the canonical projection) of an open set in $({\bf R / Z})^F$ for some finite $F\subset I$.

Beware that this does not mean that any $y\in G$ can be approximated by a sequence of multiples of $\theta$. The group $G$ is neither second countable, first countable (By the Birkhoff-Kakutani theorem, as pointed out by YCor) nor sequentially compact. Being a cluster point does not allow to extract some converging subsequence.

totally disconnectedthen $G$ is either $\mathbf{Z}$ or a quotient of $\hat{Z}$, and hence is second countable. $\endgroup$ – YCor Jul 30 '14 at 18:20