Safety equipment had allegedly been bypassed on the Tangmere locomotive which meant it passed a signal at danger in Wiltshire earlier this year.
The legal proceedings have been brought by the Office of Rail and Road (ORR).
It said its investigation established a high-speed train had passed over the junction about a minute before.
Both West Coast Railway Company and the train driver have been charged under the Health and Safety at Work Act.
The driver has been charged over "alleged intentional misuse of the Train Protection and Warning System equipment", the ORR said.
The firm is facing similar charges, the office said, "on account of its alleged failure to implement managerial controls, procedures, training and monitoring to prevent staff turning off the TPWS equipment".
Both have been ordered to appear before Swindon magistrates in January.
Ian Prosser, HM Chief Inspector of Railways at the ORR, said: "The safety of staff, volunteers, passengers and members of the public is our absolute priority.
"Britain's railways have a good safety record. However, there have been a number of incidents over the past year involving West Coast Railway Company (WCRC) trains.
"The incident at Wootton Bassett junction, where a WCRC train passed a signal at danger, was caused by alleged intentional misuse of a key safety system. This could have easily led to a catastrophic train collision.
"ORR inspectors are working with the rail industry, in particular the mainline heritage sector, to ensure that lessons are learned, and public safety is not put at risk."
At the time of the incident, WCRC - which is based in Carnforth, Lancashire - was operating the steam train as a charter service.
A spokeswoman said "safety remains our paramount priority" and the firm had "worked hard to ensure that we have learned lessons to enhance our safety performance".
"At this time we have not received any papers from the ORR in relation to the prosecution and therefore we are unable to comment on the proceedings," she added.

His side won the Championship title on a dramatic final day of the season.
Watford's draw against Sheffield Wednesday and Bournemouth's 3-0 win over Charlton saw the Cherries claim top spot and confirm promotion.
"I do think we deserve it," said Howe. "In my opinion we have been the best team this season and led the division for the longest time."
He continued: "It's fitting reward for the players - once again they were magnificent. We've consistently been the best team.
Media playback is not supported on this device
"I'm delighted the players can call themselves champions and we leave here on a real high and it's fully justified."
Watford led the league by a point going into Saturday's final round of fixtures but Atdhe Nuhiu's late equaliser denied them three points and the Cherries took advantage at The Valley.
With promotion all but sealed heading into the game, two goals from Matt Ritchie and one for Harry Arter earned the victory that earned the title.
"It's a fantastic feeling and not something we expected turning up here today," added Howe. "We wanted to do our job and be professional and take care of things.
"We were hopeful of a favour from Sheffield Wednesday and I did feel that was going to be a difficult game for Watford. When we played them very recently they never gave up that day. We are thankful for that bit of help."
Howe's side will now celebrate their historic promotion, and contemplate a first season in the top flight of English football, with a bus parade on Monday.
Bournemouth's 37-year-old manager will then turn his focus to next season's Premier League campaign, and he says the majority of his side will be given a chance to prove themselves in the top flight next term.
"You can see from my track record with these guys that the guys that have performed so well will get an opportunity to perform," he said.
"I don't believe in wholesale changes in the close season. I don't believe in not giving the players a chance to show whether they are good enough.
"Ultimately they have to take that opportunity. We stuck with the majority of the squad from League One to the Championship. There will be subtle changes, there will be players coming in, there will be players leaving, but the core group will remain the same."
A steam train driver and their employer have been charged over a near miss in which a locomotive stopped across a busy main line railway junction.
[NEXT_CONCEPT]
Bournemouth manager Eddie Howe says his side fully deserve to end the season as second-tier champions.