The fast dephasing of electron spins in an ensemble of quantum dots is detrimental for applications in quantum information processing. We show here that dephasing can be overcome by using a periodic train of light pulses to synchronize the phases of the precessing spins, and we demonstrate this effect in an ensemble of singly charged (In,Ga)As/GaAs quantum dots. This mode locking leads to constructive interference of contributions to Faraday rotation and presents potential applications based on robust quantum coherence within an ensemble of dots.