Most brain activity occurs in an ongoing manner not directly locked to external events or stimuli. Regional ongoing activity fluctuates in unison with some brain regions but not others, and the degree of long-range coupling is called functional connectivity, often measured with correlation. Strength and spatial distributions of functional connectivity dynamically change in an ongoing manner over seconds to minutes, even when the external environment is held constant. Direct evidence for any behavioral relevance of these continuous large-scale dynamics has been limited. Here, we investigated whether ongoing changes in baseline functional connectivity correlate with perception. In a continuous auditory detection task, participants perceived the target sound in roughly one-half of the trials. Very long (22-40 s) interstimulus intervals permitted investigation of baseline connectivity unaffected by preceding evoked responses. Using multivariate classification, we observed that functional connectivity before the target predicted whether it was heard or missed. Using graph theoretical measures, we characterized the difference in functional connectivity between states that lead to hits vs. misses. Before misses compared with hits and task-free rest, connectivity showed reduced modularity, a measure of integrity of modular network structure. This effect was strongest in the default mode and visual networks and caused by both reduced within-network connectivity and enhanced across-network connections before misses. The relation of behavior to prestimulus connectivity was dissociable from that of prestimulus activity amplitudes. In conclusion, moment to moment dynamic changes in baseline functional connectivity may shape subsequent behavioral performance. A highly modular network structure seems beneficial to perceptual efficiency.