Electric gates can be powered by either mains electricity or solar energy. The power source depends on factors such as location, accessibility to electrical outlets, and environmental considerations.