Let α be a nonnegative continuous function on ℝ. In this paper, the author obtains a necessary and sufficient condition for polynomials with gaps to be dense in Cα, where Cα is the weighted Banach space of complex continuous functions ƒ on ℝ with ƒ(t) exp(−α(t)) vanishing at infinity.