An obstacle to the use of graphene as an alternative to silicon electronics has been the absence of an energy gap between its conduction and valence bands, which makes it difficult to achieve low power dissipation in the OFF state. We report a bipolar field-effect transistor that exploits the low density of states in graphene and its one-atomic-layer thickness. Our prototype devices are graphene heterostructures with atomically thin boron nitride or molybdenum disulfide acting as a vertical transport barrier. They exhibit room-temperature switching ratios of ≈50 and ≈10,000, respectively. Such devices have potential for high-frequency operation and large-scale integration.