The ability to manipulate ferroelectrics at ultrafast speeds has long been an elusive target for materials research. Coherently exciting the ferroelectric mode with ultrashort optical pulses holds the promise to switch the ferroelectric polarization on femtosecond timescale, two orders of magnitude faster compared to what is possible today with pulsed electric fields. Here, we report on the demonstration of ultrafast optical reversal of the ferroelectric polarization in LiNbO3. Rather than driving the ferroelectric mode directly, we couple to it indirectly by resonant excitation of an auxiliary high-frequency phonon mode with femtosecond mid-infrared pulses. Due to strong anharmonic coupling between these modes, the atoms are directionally displaced along the ferroelectric mode and the polarization is transiently reversed, as revealed by time-resolved, phase-sensitive second-harmonic generation. This reversal can be induced in both directions, a key pre-requisite for practical applications.