18v AC output from 20-24V AC input
A suitable transformer should be available online for shipping to you.

What you propose is a bit risky as under light load the voltage may rise higher than you hope.

However depending on the gate circuitry it may be tolerant of 24V at some increase in operating speed and decrease in motor and/or gearbox lifetime. 

Gate circuitry might possibly accept DC in which case you can add in a diode bridge, smoothing capacitor and a regulator to your transformer to get the ideal voltage.

An alternative might be to find a suitable size (bigger than what you think you need) transformer with multiple taps and use it as an autotransformer to adjust your voltage to suit.  You can use taps designed for higher voltages as long as the current rating is adequate.  Say 48V and 36V taps would work to bring 24V to 18V as well.