When an individual molecule, nanocrystal, nanotube or lithographically defined quantum dot is attached to metallic electrodes via tunnel barriers, electron transport is dominated by single-electron charging and energy-level quantization. As the coupling to the electrodes increases, higher-order tunnelling and correlated electron motion give rise to new phenomena, including the Kondo resonance. To date, all of the studies of Kondo phenomena in quantum dots have been performed on systems where precise control over the spin degrees of freedom is difficult. Molecules incorporating transition-metal atoms provide powerful new systems in this regard, because the spin and orbital degrees of freedom can be controlled through well-defined chemistry. Here we report the observation of the Kondo effect in single-molecule transistors, where an individual divanadium molecule serves as a spin impurity. We find that the Kondo resonance can be tuned reversibly using the gate voltage to alter the charge and spin state of the molecule. The resonance persists at temperatures up to 30 K and when the energy separation between the molecular state and the Fermi level of the metal exceeds 100 meV.