The ability to understand and control the electronic properties of individual molecules in a device environment is crucial for developing future technologies at the nanometre scale and below. Achieving this, however, requires the creation of three-terminal devices that allow single molecules to be both gated and imaged at the atomic scale. We have accomplished this by integrating a graphene field effect transistor with a scanning tunnelling microscope, thus allowing gate-controlled charging and spectroscopic interrogation of individual tetrafluoro-tetracyanoquinodimethane molecules. We observe a non-rigid shift in the molecule's lowest unoccupied molecular orbital energy (relative to the Dirac point) as a function of gate voltage due to graphene polarization effects. Our results show that electron-electron interactions play an important role in how molecular energy levels align to the graphene Dirac point, and may significantly influence charge transport through individual molecules incorporated in graphene-based nanodevices.