Lipids play important roles in regulating membrane protein function, but the molecular mechanisms used are elusive. Here we investigated how anionic lipids modulate SthK, a bacterial pacemaker channel homolog, and HCN2, whose activity contributes to pacemaking in the heart and brain. Using SthK allowed the reconstitution of purified channels in controlled lipid compositions for functional and structural assays that are not available for the eukaryotic channels. We identified anionic lipids bound tightly to SthK and their exact binding locations and determined that they potentiate channel activity. Cryo-EM structures in the most potentiating lipids revealed an open state and identified a nonannular lipid bound with its headgroup near an intersubunit salt bridge that clamps the intracellular channel gate shut. Breaking this conserved salt bridge abolished lipid modulation in SthK and eukaryotic HCN2 channels, indicating that anionic membrane lipids facilitate channel opening by destabilizing these interactions. Our findings underline the importance of state-dependent protein-lipid interactions