Supercapacitors with gate electrodes