Presumably helicopters have landed and lifted off railroad flat cars.
Has an airplane ever been launched from a train?
F-84 during project ZELL testing (info provided by jwenting)
It's not a train, but Brendan O'Brien (with the O'Brien Flying Circus) has an act where he lands a Piper Cub on a moving trailer, towed by a car. There are some YouTube-clips showing this, including a take-off (around 1:50). Regarding your earlier comment on 'as close at it gets': I think this is it.
Not a train, but project ZEL comes closest to what you're looking at.
During the 1950s the USAF had the idea to launch combat loaded jet fighters from inside nuclear hardened buildings and caves using a short launch rail to guide the aircraft and large rocket bottles strapped to it.
The idea was to have a fighter capability after an initial nuclear attack. I had an old VHS tape about the project, it was impressive and scary what they did.
For the initial testing a launch system was built onto a heavy truck, an F-100 mounted on it using a crane, and the pilot would get in and be shot into the air by remote control.
Later the ramp was built into a modified Matador or Mace cruise missile launch bunker, the tail clearing the roof by just inches as the F-100 was launched in a massive cloud of black smoke.
The program was eventually abandoned, but no doubt provided a lot of information about structural integrity and forces inside rocket silos.
The idea behind ZELL was to be able to disperse aircraft away from airfields, reducing the risk that the aircraft will be damaged in an attack on the airfield. Using rails misses the point of dispersal: you swap one easily identifiable, stationary target (airfield) for an easily identifiable, limited-movement target (train on rails).
You also have the problem that the size of rail cargo is severely limited by the loading gauge (i.e. the largest height and width of a rail vehicle). All obstacles around the track (overhead catenaries, signalling, tunnels, platforms) are designed to fit around this loading gauge. This means you have to remove the wings and tailplanes from your aircraft when you move the train, increasing reaction time.
It's much easier (and you get a much larger selection of hiding places) to hide a lorry with an assembled aircraft on top than to hide a train with same. You also get a much larger selection of suitable roads to travel on.
After many Google searches and investigating on this topic, I find no evidence that an airplane has ever been launched from a train.
First of all, it would be unlikely for a person to risk an entire airplane along with themselves doing something so dangerous. By considering this fact, I doubt that an airplane has ever been launched from a train.
Second of all, by attempting such a thing would risk a catastrophe. This would probably cause an explosion that would no be so pretty.
So I have come to the conclusion that an airplane has never been launched from a train.