The electrical gradient is typically measured using a technique called patch-clamp electrophysiology. This method involves placing a glass pipette, containing an electrode, onto the cell membrane to measure the voltage difference across the membrane. This technique allows for the precise measurement of ion channel activity and the electrical properties of the cell membrane.