Star formation in the universes most massive galaxies proceeds furiously early in time but then nearly ceases. Plenty of hot gas remains available but does not cool and condense into star-forming clouds. Active galactic nuclei (AGN) release enough energy to inhibit cooling of the hot gas, but energetic arguments alone do not explain why quenching of star formation is most effective in high-mass galaxies. In fact, optical observations show that quenching is more closely related to a galaxys central stellar velocity dispersion ($sigma_v$) than to any other characteristic. Here, we show that high $sigma_v$ is critical to quenching because a deep central potential well maximizes the efficacy of AGN feedback. In order to remain quenched, a galaxy must continually sweep out the gas ejected from its aging stars. Supernova heating can accomplish this task as long as the AGN sufficiently reduces the gas pressure of the surrounding circumgalactic medium (CGM). We find that CGM pressure acts as the control knob on a valve that regulates AGN feedback and suggest that feedback power self-adjusts so that it suffices to lift the CGM out of the galaxys potential well. Supernova heating then drives a galactic outflow that remains homogeneous if $sigma_v gtrsim 240 , {rm km , s^{-1}}$. AGN feedback can effectively quench galaxies with a comparable velocity dispersion, but feedback in galaxies with a much lower velocity dispersion tends to result in convective circulation and accumulation of multiphase gas within the galaxy.