Memristors are continuously tunable resistors that emulate synapses. Conceptualized in the 1970s, they traditionally operate by voltage-induced displacements of matter, but the mechanism remains controversial. Purely electronic memristors have recently emerged based on well-established physical phenomena with albeit modest resistance changes. Here we demonstrate that voltage-controlled domain configurations in ferroelectric tunnel barriers yield memristive behaviour with resistance variations exceeding two orders of magnitude and a 10 ns operation speed. Using models of ferroelectric-domain nucleation and growth we explain the quasi-continuous resistance variations and derive a simple analytical expression for the memristive effect. Our results suggest new opportunities for ferroelectrics as the hardware basis of future neuromorphic computational architectures.