Many animals sense environmental gases such as carbon dioxide and oxygen using specialized populations of gas-sensing neurons. The proper development and function of these neurons is critical for survival, as the inability to respond to changes in ambient carbon dioxide and oxygen levels can result in reduced neural activity and ultimately death. Despite the importance of gas-sensing neurons for survival, little is known about the developmental programs that underlie their formation. Here we identify the ETS-family transcription factor ETS-5 as critical for the normal differentiation of the carbon dioxide-sensing BAG neurons in Caenorhabditis elegans. Whereas wild-type animals show acute behavioral avoidance of carbon dioxide, ets-5 mutant animals do not respond to carbon dioxide. The ets-5 gene is expressed in BAG neurons and is required for the normal expression of the BAG neuron gene battery. ets-5 may also autoregulate its expression in BAG neurons. ets-5 is not required for BAG neuron formation, indicating that it is specifically involved in BAG neuron differentiation and the maintenance of BAG neuron cell fate. Our results demonstrate a novel role for ETS genes in the development and function of gas-detecting sensory neurons.