The workers were repairing a section of the West Coast Main Line in Lancashire when the near-miss occurred.
An investigation by the Rail Accident Investigation Branch (RAIB) found the incident was caused largely by human error.
The group was working on a bend with a restricted view and relied on warnings of any approaching trains over a radio from lookout colleagues who had a clear view of the track.
But the workers did not receive any warnings and after seeing the approaching Edinburgh to Manchester Airport train, jumped clear, just four seconds before it hurtled past them at 98mph (158kmh).
Some staff were unable to reach a safe position and had to press themselves against a bridge parapet.
None was injured but they were left shaken and work was stopped for the remainder of the shift.
The RAIB said: “The incident was caused because a lookout did not give a warning, either because he operated the wrong switch on his radio transmitter by mistake, or because he forgot about the need to send a warning during an intended delay period between seeing the train and operating the warning switches.
“This delay was because he was positioned on a long section of straight track and could see approaching trains for significantly longer than the time required for the work group to move into a position of safety.
“A previous RAIB recommendation intended to mitigate this risk had not been implemented due to administrative errors.
“It is probable that the lookout’s vigilance had degraded as he had been working continuously for almost two hours.”
The incident happened on September 22 last year on a stretch of line south of Hest Bank between Carnforth and Lancaster.
The RAIB said the track workers comprised contract staff and a controller of site safety employed by Network Rail (NR).
They were packing ballast under sleepers on the up (towards London) main line on a small bridge.
A lookout-operated warning system (LOWS) was being used to give warning of approaching trains because of the gang’s restricted view.
This system is designed to allow lookouts to signal the approach of a train by operating two toggle switches on an LOWS lookout unit. This then transmits a radio signal to a LOWS static unit which then gives both visual and audible warnings.
The RAIB said that on the afternoon of the near-miss, the LOWS equipment was being operated by two NR lookouts, one on each side of the site of work and each equipped with an LOWS lookout unit.
The lookout watching for trains on the “up” line was located about half a mile from the site of work, in a position which gave him a good view of trains approaching from the north.
The static unit was located near the track workers. The LOWS is reported to have been both tested and operating normally prior to the incident.
As a result of its investigation the RAIB has made two recommendations to Network Rail, covering the management of working time for tasks which depend on vigilance and the circumstances in which LOWS should be used.