Circuitron. The first is the DT-3 Grade Crossing detector. This little widget uses two little photo cells to detect a train. This was about $30 at the local hobby shop. However the hobby shop was out of the FL-2 flasher board. But I got lucky and scored two of them of eBay $10! (seller train-signal) These things sell new for $27. So there you have it, with the the mile or so of wiring involved, you have a $70 grade crossing.
All that work and money kind of makes me nostalgic about those old Lionel pressure switches I used to use for this purpose: