I built a similar thing, but instead of using a RFID reader / computer software / IR stuff, I just had the train run over a section of track (one on either side of the crossing) that pushed down on a touch sensor that triggered the gates to go down until both sensors were released.
Sorry, I don't have any picks as my Lego stuff is currently boxed away at the moment.
edit: typo