Protein which is part of a transmembrane protein complex that forms a hydrophilic channel across the lipid bilayer through which potassium ions can diffuse down their electrochemical gradient. The channels are gated and only open in response to a specific stimulus, such as a change in membrane potential (voltage-gated). They are important for the regulation of the resting membrane potential and for the control of the shape and frequency of action potentials.