For welding stainless steel hinges to mild steel gates & posts we recommend using type 309 (23 12L to BS EN 12072) welding rods or wire. This is should help avoid cracking in the weld dilution zone that can be a problem if normal rods or filler is used.
Unprotected welds subject to aggressive environments such as immersion in seawater could result in sacrificial corrosion to the less noble carbon steel part. However, post weld surface coating repair would normally be needed to the carbon steel to 'restore' the corrosion protection.
If this re-coating / painting is allowed to lap over onto the weld bead then the joint should not be at risk to bimetallic corrosion in any environment so long as the coating is sound. Ideally the weld bead should be covered so that only the 'parent' stainless steel is ultimately exposed. This ensures that galvanic corrosion cells cannot be set up across the joint, where there is a composition 'gradient.’