For most applications, galvanized steel will accomplish the same task as stainless. However, your operating conditions, longevity requirements and budget will dictate which one's best for you.
Stainless steel is made by adding at least 10.5% chromium (by weight) to regular carbon steel, according to the Stainless Steel Industry of North America. To galvanize steel, manufacturers dip the raw carbon steel in a bath of molten zinc, which bonds to the steel's surface in a thin layer.
Both stainless and galvanized steels prevent corrosion by forming a "sacrificial" layer of protective oxides. Stainless forms an almost invisible layer of chromium oxide and galvanized forms a (comparatively) thick layer of zinc oxide, according the Metallurgical Consultants website.
Eventually, the galvanized steel's zinc oxide coating will wear away, leaving it vulnerable to corrosives and weather. Stainless steel contains chromium all the way through, so its protective layer is continually replenished.
The zinc layer on galvanized steel is less than a millimeter thick, so even minor scratches can result in localized rust. Stainless won't rust no matter how deep the scratch.
Galvanized steel is far cheaper than even the most inexpensive stainless steels. Galvanized can drastically decrease the cost of structures that use very thick steel components, like buildings and machine housings.