Steel needs protecting in order to retain its properties, the best way is to hot dip galvanize which provides a protective base coat that can last more than 50 years.
Click here to see the benefits of galvanizing.
Many gate manufacturers will give you the option to have your gate painted or powder coated directly onto the steel as a good value solution. However be aware of incurring repeat costs for the additional maintenance required over the lifetime of your gate.
Wooden Gates
Wooden products can be stained or preserved to help waterproof the wood and prevent rot. However it must be maintained on an annual basis.
Varnishes and stains suitable for your wooden gates, for example Cuprinol are available at most hardware stores.