Using optical in-situ measurements in an electrochemical environment, we study the electrochemical tuning of the transmission spectrum of films from the nanoporous gold (NPG) based optical metamaterial, including the effect of the ligament size. The long wavelength part of the transmission spectrum around 800 nm can be reversibly tuned via the applied electrode potential. The NPG behaves as diluted metal with its transition from dielectric to metallic response shifted to longer wavelengths. We find that the applied potential alters the charge carrier density to a comparable extent as in experiments on gold nanoparticles. However, compared to nanoparticles, a NPG optical metamaterial, due to its connected structure, shows a much stronger and more broadband change in optical transmission for the same change in charge carrier density. We were able to tune the transmission through an only 200 nm thin sample by 30%. In combination with an electrolyte the tunable NPG based optical metamaterial, which employs a very large surface-to-volume ratio is expected to play an important role in sensor applications, for photoelectrochemical water splitting into hydrogen and oxygen and for solar water purification.