Gain modulation is a computational mechanism critical for sensory processing. Yet, the cellular mechanisms that decrease the gain of cortical neurons are unclear. To test if low frequency subthreshold oscillations could reduce neuronal gain during wakefulness, we measured the membrane potential of primary visual cortex (V1) layer 2/3 excitatory, parvalbumin-positive (PV+), and somatostatin-positive (SOM+) neurons in awake mice during passive visual stimulation and sensory discrimination tasks. We found prominent 3-5 Hz membrane potential oscillations that reduced the gain of excitatory neurons but not the gain of PV+ and SOM+ interneurons, which oscillated synchronously with excitatory neurons and fired strongly at the peak of depolarizations. 3-5 Hz oscillation prevalence and timing were strongly modulated by visual input and the animal's behavioral response, suggesting that these oscillations are triggered to adjust sensory responses for specific behavioral contexts. Therefore, these findings reveal a novel gain reduction mechanism that adapts sensory processing to behavior.