Faulty wiring left in place by a private contractor diverted an Inter- City High Speed Train into a passing loop normally used for goods trains coming the other way.
The shocked driver of the Manchester to Bournemouth express stopped his train and reported the incident, and the line was closed for the rest of the day.
Railtrack managers have ordered a top-level inquiry into the "potentially dangerous" situation, which was supposed never to happen again in the wake of the Clapham disaster of 1988 in which 35 passengers died.
The inquiry into the south London crash found that incorrect installation of wiring during engineering work allowed a green signal to be displayed when it should have been red.
Tighter controls on signalling work were put in place, but the same sequence of events occurred last Monday. Infrastructure maintenance contractor GTRM Ltd had been working over the weekend at Kenilworth Common on the line between Coventry and Leamington. The route is used by Virgin Cross Country services and goods trains.
The first passenger train of the day approached Kenilworth at speed at 7.45am and was shown a green light to continue on the main line, passing the loop line on which trains going in the opposite direction are halted.
A railway source said: "Instead of continuing on the main line, as signalled, the Virgin train was routed into the loop - for head-on collision with a northbound train if one had been waiting there.
"Railtrack staff in Coventry signal box were unaware of any of this - the wrong route setting and signal indications, until a shaken driver of the Virgin Trains HST contacted them from the telephone on the next signal."