Other answers have provided excellent inputs your requirement; My answer concentrates purely on proximity (and presence) sensing of model trains, no identification, in the scales which I take interest in, the tiny N and T scales.
Keeping in mind your need for software simplicity, a chopped-infrared transmitter / sensor combination will be easiest. Your mention of the TSOP devices indicates you are already evaluating that path. Consider instead the TSSP4P38 which is designed specifically for proximity sensing using 38 KHz chopped IR:

Stating what may be obvious to you already: Distance sensing through time-of-flight of electromagnetic waves (IR, radar etc) is impractical for your purposes: Given the speed of light, resolution in femtoseconds or lower is needed for the 0 to 10 centimeter target distances you are probably working with (1:160 N-scale). In the "real world" transit paths you mention in a comment, distances may be larger, I speculate.
An IR reflective sensor mechanism used in model railroads typically involves, instead, intensity of the reflected IR signal, which would increase per inverse-square law with locomotive approach.
Your device would need to have an IR LED like the TSAL6200 and the TSSP4P38, housed in something like the diagram on Page 5 of the TSSP datasheet. The combination would be mounted between ties on your track, one facing each way. If you mount it low enough and pointing almost parallel to the tracks, external object reflections will be minimized, the tracks working as blinkers.
The output of the TSSP is a logic-level pulse of duration proportionate to the reflected IR. As a locomotive approaches, successive pulses get longer, so readings of at least 2 consecutive pulses, preferably several more, will provide a set of pulse durations and thereby a speed indication. From the datasheet:
The output pulse width of the TSSP4P38 has an almost linear
relationship to the distance of the emitter or the distance of an
reflecting object. The TSSP4P38 is optimized to suppress almost all
spurious pulses from energy saving fluorescent lamps.
If you stay with practicable precision requirements for your device, "fast" versus "slow", "approaching" versus "receding", and of course presence of a locomotive within sensor range, are feasible.
You will have to baseline the system to account for static reflections e.g. from scenery. Also, calibration of actual speed versus consecutive pulse lengths will provide the "fast" / "slow" range mappings.
Pulse duration can be measured using a timer/counter input on your microcontroller of choice. There are several examples on the web for doing this on the Arduino, but as you have mentioned using a Stellaris Launchpad instead, some research may be needed for it.
This is a high-level overview of a solution, please feel free to ask if specific aspects need clarification. At a guess, given your stated background, this won't be an overnight project, but is achievable within a holiday season. Some of the readymade model railroad products you mentioned use this mechanism.
For a more general distance-sensing discussion, please look at this answer from an earlier question.