Animals have evolved homeostatic responses to changes in oxygen availability that act on different timescales. Although the hypoxia-inducible factor (HIF) transcriptional pathway that controls long-term responses to low oxygen (hypoxia) has been established, the pathway that mediates acute responses to hypoxia in mammals is not well understood. Here we show that the olfactory receptor gene Olfr78 is highly and selectively expressed in oxygen-sensitive glomus cells of the carotid body, a chemosensory organ at the carotid artery bifurcation that monitors blood oxygen and stimulates breathing within seconds when oxygen declines. Olfr78 mutants fail to increase ventilation in hypoxia but respond normally to hypercapnia. Glomus cells are present in normal numbers and appear structurally intact, but hypoxia-induced carotid body activity is diminished. Lactate, a metabolite that rapidly accumulates in hypoxia and induces hyperventilation, activates Olfr78 in heterologous expression experiments, induces calcium transients in glomus cells, and stimulates carotid sinus nerve activity through Olfr78. We propose that, in addition to its role in olfaction, Olfr78 acts as a hypoxia sensor in the breathing circuit by sensing lactate produced when oxygen levels decline.