You didn’t say how wide the gap is. From the sensative strips user manual, mounting instructions:
{place the magnet} no more than 10 mm above the square edge of the strip and 5 mm from the sides.
In addition, no magnet-based contact sensor is going to work well on the iron gate itself as it will eventually magnetize the area around the sensor which throws off the readings. So you’ll need to plan to put a bit of plastic above the iron and then mount the sensor on that. That might actually make the gap a bit narrower, so it’s something to consider.
The following topic discusses the metal gate issue.