A model for anomalous rectification: Electrochemical-potential-dependent gating of membrane channels