Cortical gamma oscillations (20-80 Hz) predict increases in focused attention, and failure in gamma regulation is a hallmark of neurological and psychiatric disease. Current theory predicts that gamma oscillations are generated by synchronous activity of fast-spiking inhibitory interneurons, with the resulting rhythmic inhibition producing neural ensemble synchrony by generating a narrow window for effective excitation. We causally tested these hypotheses in barrel cortex in vivo by targeting optogenetic manipulation selectively to fast-spiking interneurons. Here we show that light-driven activation of fast-spiking interneurons at varied frequencies (8-200 Hz) selectively amplifies gamma oscillations. In contrast, pyramidal neuron activation amplifies only lower frequency oscillations, a cell-type-specific double dissociation. We found that the timing of a sensory input relative to a gamma cycle determined the amplitude and precision of evoked responses. Our data directly support the fast-spiking-gamma hypothesis and provide the first causal evidence that distinct network activity states can be induced in vivo by cell-type-specific activation.