Behavior cannot be predicted from a "connectome" because the brain contains a chemical "map" of neuromodulation superimposed upon its synaptic connectivity map. Neuromodulation changes how neural circuits process information in different states, such as hunger or arousal. Here we describe a genetically based method to map, in an unbiased and brain-wide manner, sites of neuromodulation under different conditions in the Drosophila brain. This method, and genetic perturbations, reveal that the well-known effect of hunger to enhance behavioral sensitivity to sugar is mediated, at least in part, by the release of dopamine onto primary gustatory sensory neurons, which enhances sugar-evoked calcium influx. These data reinforce the concept that sensory neurons constitute an important locus for state-dependent gain control of behavior and introduce a methodology that can be extended to other neuromodulators and model organisms.