RFID might be overkill for this application. A reed switch under the track and a magnet under the train would be more appropriate.
If all you want to do is open the gate as the train approaches and close it after the train has passed, you need an RS flip-flop, set by a reed switch on one side of the gate and reset by one on the other. It's output will be an indication of whether the train is near to the gate and you can use that to control the opening mechanism.
Brian.