To me, it looks like you have a very old Zinc coated gate, which has many areas which have been touched up with a grey paint (I may be completely wrong)..
Typically the galvanization is done when the clean metal fence is dipped into molten zinc and effectively coated in a corrosive resistant zinc shell. if you would like to return the fence to original condition, your best bet would be to remove the entire gate and take the unit to a galvanizing plant for re-galvanizing. Unfortunately the fact that it may already be galvanized means that they need to acid remove the original coating which will cost double, and they would be worried that the acid burns into the mesh too much. (you would have to remove your lock and consult the galvanizing guys if the current hinges will be ok)
The other option is to simply remove all traces of the rust from the existing gate and re-apply a coating of paint. I would say if you choose to paint the gate do not remove, however if spraying is your intention, then i would recommend removal.
To prepare for painting. some sand paper and stainless steel brushes would do the trick, if you have some power tools you could really benefit from steel brush powertool accessories (drill, grinder or polisher)
Using some sand paper, and steel brushes (in the heavy rust areas) scrape away all rust. Once you are happy, I would apply a primer coating (zinc chromite metal primer) and then a final coat of good quality enamel paint.
The corrosion you are seeing are the zinc which has formed pots (are you near the coast?) if so... painting your fence with enamel is not advised.. since corrosion is too excessive near the coast.
another option would be to prepare the fence (sanding where the rust areas are) and then re-applying the galvanized coating with a brush. this will add some life back to the gate (but does not compare to actually having the gate professionally galvanized)
a Google search for galvanizing paint or spray should get some results.
Lastly, if you are worried about painting on the wall, simply use some masking tape on the edges.