The hotly-disputed bill, which passed by 98 to 67, allows the government to declare a “state of emergency” if the migrant numbers suddenly rise and reject most asylum-seekers directly at the border, including from war-torn countries like Syria.
Rights groups, religious leaders and opposition parties have condemned the legislation — the latest in a string of hardline measures against migrants — as violating international human rights conventions.
UNHCR, the UN's refugee agency, warned that it “removes a centrepiece of refugee protection”.
But Interior Minister Wolfgang Sobotka insisted Austria had no other choice as long as “so many other European Union members fail to do their part” to stop the influx.
“We cannot shoulder the whole world's burden,” he said.
Wedged between Europe's two main refugee routes – the Balkans and Italy — Austria received around 90,000 asylum requests in 2015, the second-highest in the bloc on a per capita basis.
More than a million people, primarily from Syria, Iraq and Afghanistan, landed in Europe last year, triggering the continent's worst migration crisis since the aftermath of World War II.
Many braved a short but dangerous sea journey from Turkey to Greece, before trekking up through the Balkans toward western and northern Europe.
To reduce the flow, the EU recently struck a controversial deal with Ankara, under which all “irregular” migrants reaching Greece after March 20 will be returned to Turkey.
Although the pact has led to a sharp drop in arrivals, the International Organisation for Migration last week warned that the numbers were “once again ticking up”.
The crisis has boosted populist fringe parties across Europe, pressuring traditionally centrist governments to adopt a much firmer stance on migrants.
Under Austria's new law, the government can now declare an emergency if the migrant flow threatens the country's “national security”.
Border authorities will then only grant access to refugees facing safety threats in a neighbouring transit country or whose relatives are already in Austria. Some groups including minors and pregnant women will however be exempt from the rule.
The “special measures” will also force migrants to request asylum directly at the border in yet-to-be-built registration centres, where they may be held for up to 120 hours while their application is being checked.
The restrictions are similar to tough rules introduced by the right-wing government in neighbouring Hungary last year.
In addition, MPs also voted to restrict existing asylum laws by placing limits on the length of asylum granted to migrants and making it harder for their families to join them.
“These are extremely dangerous tools that are being sharpened here, especially if they fall into the wrong hands,” warned the leader of the small NEOS opposition party, Mathias Strolz, ahead of the vote.
Shortly before the vote, a group of protesters threw leaflets from the parliament's upper gallery reading “Don't walk over dead bodies, it won't keep you afloat”.
It comes after the candidate of the far-right Freedom Party (FPÖ), Norbert Hofer, sent shock waves through the political establishment by winning the first round of a presidential ballot on Sunday.
The two candidates of the ruling centrist coalition failed to even make it into the runoff on May 22.
The FPÖ also looks set to do well in the next scheduled general election in 2018.
'Far from an invasion'
Trying to stem voter desertion to the far-right, Austria's government erected border fences and introduced an annual cap on asylum-seekers.
It also pressured other countries along the Balkan trail to close their frontiers earlier this year, effectively shutting the route to migrants.
The clampdown left some 54,000 migrants currently stranded in Greece.
It also pushed people smugglers to seek out new routes into Europe, including via Italy, which has so far this year seen 26,000 migrants land on its shores after setting off from Libya.
The surge in arrivals in neighbouring Italy has prompted Austria to announce plans to re-instate border controls — including a 370-metre (1,200-feet) fence — at the Brenner pass in the Alps, a key transport corridor between northern and southern Europe.
The move has sparked protests at the checkpoint in recent weeks and drawn strong condemnation from Italy.
“We're very far from an invasion,” Foreign Affairs Minister Paolo Gentiloni told Austrian newspaper Die Presse on Wednesday.