We explore the generation of the baryon asymmetry in an extension of the Standard Model where the lepton number is promoted to a $U(1)_ell$ gauge symmetry with an associated $Z^prime$ gauge boson. This is based on a novel electroweak baryogenesis mechanism first proposed by us in Ref. cite{Carena:2018cjh}. Extra fermionic degrees of freedom - including a fermionic dark matter $chi$ - are introduced in the dark sector for anomaly cancellation. Lepton number is spontaneously broken at high scale and the effective theory, containing the Standard Model, the $Z^prime$, the fermionic dark matter, and an additional complex scalar field $S$, violates CP in the dark sector. The complex scalar field couples to the Higgs portal and is essential in enabling a strong first order phase transition. Dark CP violation is diffused in front of the bubble walls and creates a chiral asymmetry for $chi$, which in turn creates a chemical potential for the Standard Model leptons. Weak sphalerons are then in charge of transforming the net lepton charge asymmetry into net baryon number. We explore the model phenomenology related to the leptophilic $Z^prime$, the dark matter candidate, the Higgs boson and the additional scalar, as well as implications for electric dipole moments. We also discuss the case when baryon number $U(1)_B$ is promoted to a gauge symmetry, and discuss electroweak baryogenesis and its corresponding phenomenology.