The light-gated ion channel channelrhodopsin 2 (ChR2) from Chlamydomonas reinhardtii is a major optogenetic tool. Photon absorption starts a well-characterized photocycle, but the structural basis for the regulation of channel opening remains unclear. We present high-resolution structures of ChR2 and the C128T mutant, which has a markedly increased open-state lifetime. The structure reveals two cavities on the intracellular side and two cavities on the extracellular side. They are connected by extended hydrogen-bonding networks involving water molecules and side-chain residues. Central is the retinal Schiff base that controls and synchronizes three gates that separate the cavities. Separate from this network is the DC gate that comprises a water-mediated bond between C128 and D156 and interacts directly with the retinal Schiff base. Comparison with the C128T structure reveals a direct connection of the DC gate to the central gate and suggests how the gating mechanism is affected by subtle tuning of the Schiff base’s interactions.