The Conservative government used its majority to limit debate, setting in motion a series of overnight votes that saw the bill passed early Wednesday morning.
"The economy's being affected, there's no question about that at all," Labour Minister Lisa Raitt told the Commons during question period Tuesday.
Fast-tracking the bill through all stages took all of Tuesday evening, with votes in the Commons carrying on after midnight. Bill C39 was eventually passed just before 1:30 a.m.
It will now go to the Conservative-dominated Senate for Royal Assent.
"It's getting very tight for people who rely upon CP Rail and the transit of their goods and the receipt of their materials," Raitt said.
"And as such, for the greater good of the economy, we feel that the time has come where the negotiations have stopped, the work stoppage continues and we really do need to make sure that CP Rail gets working on Thursday."
But the union, backed by Opposition MPs, said the government's quick threat to order 4,800 engineers and conductors back on the job shortly after the strike began last Wednesday short-circuited talks at the bargaining table.
"When will these Conservatives figure out that workers are the backbone of the economy?" charged NDP critic Irene Mathyssen, noting a cut to the workers' pension fund "is at the heart of this dispute."
Mathyssen accused CP Rail, which posted a profit of $570 million last year, of going after the pension plan to increase its profitability and said the Harper government is enabling the company.
"Why are Conservatives always picking winners and losers and why is it that workers' pension are always under attack?"
Raitt pointed out that the back-to-work legislation calls for a government-appointed arbitrator to resolve outstanding differences within 90 days, and "doesn't pre-determined any issue."
"We are acting on the side of the Canadian economy and the general Canadian public interest," said Raitt.
"We're not the ones taking sides," added the minister. "I don't think the Opposition can say the same thing."
It's the third time in the past year the Harper government has moved to legislate an end to a labour dispute and critics say the government is tilting the field in favour of employers and against workers.
NDP Leader Tom Mulcair opened the evening debate by saying the Conservatives have sent employers a clear signal with the repeated legislated back-to-work threats at Canada Post, Air Canada and now CP Rail.
"It send a terrible message that legislative settlement is the new labour relations norm in Canada," said Mulcair. "There is no incentive for the parties to negotiate in good faith if they know the government will step in."
About 100 CP Rail workers, members of the Teamsters Canada Rail Conference, protested on the steps below Parliament's Peace Tower, where they met with a number of Liberal and NDP MPs.
Protesting employee Richard Moffat, president of a Teamsters local in Toronto and a locomotive engineer, said CP Rail is "asking for everything" and claimed the company has been aiming for an arbitrated settlement from the get-go.
"The back to work legislation puts us in arbitration — right where they want to be — by a Conservative-appointed arbitrator," said Moffat.
"And this all came from Lisa Raitt tipping her hand last week that she was going to order us back to work."
CP Rail countered Tuesday that "multiple reasonable and good faith offers" have been made to the unionized employees since talks began last October.
"The Teamsters pushed their members into an unnecessary work stoppage and have throughout the negotiations refused to minimize the impact on other affected CP employees, our customers and the Canadian economy," Peter Edward, the company's vice-president of human resources and industrial relations, said in a release.
Opposition MPs also complained that the government has used its majority to limit parliamentary debate 23 times since last May's election — but the government says that with CP freight traffic at a standstill and costing the economy half a billion dollars a week, time is of the essence.
The labour unrest comes amid front-office turmoil that saw CP's chief executive officer Fred Green and much of the old company board forced out by an investor revolt, led by a New York-based hedge fund, Pershing Square Capital Management LP.
Green, who was accused by Pershing principal Bill Ackman of running an under-performing company, walked away with an $18-million severance package.
Also on HuffPost