Memristors are continuously tunable resistors that emulate biological synapses. Conceptualized in the 1970s, they traditionally operate by voltage-induced displacements of matter, although the details of the mechanism remain under debate. Purely electronic memristors based on well-established physical phenomena with albeit modest resistance changes have also emerged. 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.