A periodically bunched electron beam is useful for generating high-brightness electron superradiance. This paper studies the generation and acceleration of density-modulated electron beams from a photocathode electron gun driven by a laser beat wave. Computer simulation shows the feasibility of accelerating and preserving the density-modulated electron beam in an accelerator. This paper also details the implementation of a beat-wave laser system with a variable beat frequency for driving a photocathode electron gun.