ScotRail has been unable to divert trains via Dalmeny as it did in the past because that line was not electrified along with the main route last year.
Network Rail Scotland (NRS) hopes to reopen the route through Winchburgh Tunnel in West Lothian by tomorrow after pumping out water 2ft deep.
It said 60 per cent of the area's monthly rainfall had fallen in three hours, with trains unable to get east of Linlithgow since last night.
Dunblane-Edinburgh services and Glasgow-Edinburgh services via Cumbernauld were halted at Falkirk Grahamston, with passengers transferred to buses.
Two other Glasgow-Edinburgh lines, via Bathgate and Shotts, are unaffected.
However, The Scotsman has learned that work to tackle the tunnel's chronic flooding problem was part of lowering the track by 8in to accommodate overhead power wires for the electrification scheme in 2015.
Rail writer Dr Ann Glen wrote in her book Transforming the Railways of Central Scotland last year: "825m (2,750ft) of new drains [were] formed, with a 'super drain' inserted between the tracks to try to cure the persistent wetness once and for all."
She told The Scotsman: "They wanted to see to it that in the long term the tunnel would not cause repeated problems.
Dr Glen said "slab track", or concrete sections, were also laid under the rails in the tunnel to remove the problem of ballast being washed away by flooding.
But NRS said it “managed” not “cured” drainage issues.
It said: "In excess of 50mm of rain fell in the area in just over an hour yesterday evening, overwhelming drainage in and around the railway.
"Work continues to pump flood water out of the full 330m length of the tunnel.
"Water is being moved to the nearby Niddrie Burn in the east and pumped clear in the west.
"Network Rail engineers, assisted by the Scottish Fire and Rescue Service, are working to clear the standing water from the tunnel and overnight inspections will take place to check the track and signalling for any damage.
"Train services are expected to resume from Friday morning."
NRS route director Liam Sumpter said: “We are working as quickly as possible to reduce the water levels so we can inspect the tracks for damage and clear out any sludge or debris that may affect the signalling systems.
“We’re sorry for the inconvenience this incident has caused our customers and will get services back on the move as soon as possible.”
A ScotRail spokesperson said: "We've been doing everything we can to keep customers moving while engineers work round the clock to pump over two feet of flood water from the Winchburgh tunnel.
"With it being peak tourist season replacement transport is limited, so we'd encourage customers to make alternative arrangements where possible."
Rail campaigners attacked the decision to downgrade the electrification project in 2012, which originally included the Dalmeny line.
Lawrence Kemp, a former rail watchdog member, said: "The original scheme had a chord being built linking the lines going from Winchburgh Junction to Dalmeny and the Fife lines coming off the Forth Bridge going to Edinburgh.
"The benefit of the chord is it would cut out the tunnel, which has a history of flooding.
"As the chord was not included and electrification was not extended to Dalmeny and back to Edinburgh, then if the tunnel is flooded electric trains have no route round the tunnel.
"The previous diesel trains could go down to Dalmeny and use a turn back facility and head into Edinburgh on the Fife line."