Is there a masonry filler tough enough to drill into once it's set
clean the holes out well with vinegar and water.  then put epoxy dough in the gaps, smooth and point as well as you can.  once cured, drill new holes, but larger diameter and deeper.  then use anchoring epoxy (like redhead a7 or c6) to mount threaded rods.  attach your gates with nuts and washers and you are done.