A ballast is an electronic device used to operate a gas discharge lamp or other type of gas-filled lamp. It contains a high-voltage transformer that increases the voltage applied to the lamp and a capacitor that continuously maintains the voltage applied to the lamp.