The enormous size and cost of current state-of-the-art accelerators based on conventional radio-frequency technology has spawned great interest in the development of new acceleration concepts that are more compact and economical. Micro-fabricated dielectric laser accelerators (DLAs) are an attractive approach, because such dielectric microstructures can support accelerating fields one to two orders of magnitude higher than can radio-frequency cavity-based accelerators. DLAs use commercial lasers as a power source, which are smaller and less expensive than the radio-frequency klystrons that power today’s accelerators. In addition, DLAs are fabricated via low-cost, lithographic techniques that can be used for mass production. However, despite several DLA structures having been proposed recently1,2,3,4, no successful demonstration of acceleration in these structures has so far been shown. Here we report high-gradient (beyond 250 MeV m−1) acceleration of electrons in a DLA. Relativistic (60-MeV) electrons are energy-modulated over 563 ± 104 optical periods of a fused silica grating structure, powered by a 800-nm-wavelength mode-locked Ti:sapphire laser. The observed results are in agreement with analytical models and electrodynamic simulations. By comparison, conventional modern linear accelerators operate at gradients of 10–30 MeV m−1, and the first linear radio-frequency cavity accelerator was ten radio-frequency periods (one metre) long with a gradient of approximately 1.6 MeV m−1 (ref. 5). Our results set the stage for the development of future multi-staged DLA devices composed of integrated on-chip systems. This would enable compact table-top accelerators on the MeV–GeV (106–109 eV) scale for security scanners and medical therapy, university-scale X-ray light sources for biological and materials research, and portable medical imaging devices, and would substantially reduce the size and cost of a future collider on the multi-TeV (1012 eV) scale.