The cost, size and availability of electron accelerators is dominated by the achievable accelerating gradient. Conventional high-brightness radio-frequency (RF) accelerating structures operate with 30-50 MeV/m gradients. Electron accelerators driven with optical or infrared sources have demonstrated accelerating gradients orders of magnitude above that achievable with conventional RF structures. However, laser-driven wakefield accelerators require intense femtosecond sources and direct laser-driven accelerators and suffer from low bunch charge, sub-micron tolerances and sub-femtosecond timing requirements due to the short wavelength of operation. Here, we demonstrate the first linear acceleration of electrons with keV energy gain using optically-generated terahertz (THz) pulses. THz-driven accelerating structures enable high-gradient electron or proton accelerators with simple accelerating structures, high repetition rates and significant charge per bunch. Increasing the operational frequency of accelerators into the THz band allows for greatly increased accelerating gradients due to reduced complications with respect to breakdown and pulsed heating. Electric fields in the GV/m range have been achieved in the THz frequency band using all optical methods. With recent advances in the generation of THz pulses via optical rectification of slightly sub-picosecond pulses, in particular improvements in conversion efficiency and multi-cycle pulses, increasing accelerating gradients by two orders of magnitude over conventional linear accelerators (LINACs) has become a possibility. These ultra-compact THz accelerators with extremely short electron bunches hold great potential to have a transformative impact for free electron lasers, future linear particle colliders, ultra-fast electron diffraction, x-ray science, and medical therapy with x-rays and electron beams.