Switching off superconductivity in metals by gate electrodes