The law, passed on the third and final reading by 53-38, limits the use of the Shin Bet's surveillance technologies to three weeks and to cases "in which an epidemiological investigation cannot be completed otherwise".
The government had approved a similar measure in mid-March at the height of the country's Covid-19 outbreak, only to have it blocked by Israel's top court pending new legislation.
The measure, the details of which were kept secret, was then challenged in Israel's top court, which ruled that it must be formalised in law or dropped.
The government initially chose not to push forward with legislation and the measure was discontinued on June 10 as infection rates dropped.
But after nearly a month of growing infection numbers, Prime Minister Benjamin Netanyahu tabled a bill last week, with a team of ministers appointed to oversee the measure and evaluate its necessity.
Zvi Hauser, chairman of the parliament's foreign and defence committee, which prepared the bill for its second and third readings, said ahead of the final vote that "unfortunately" there was currently "no civilian alternative".
Read also: Israeli firm may have helped Saudis hack Jeff Bezos' phone, UN experts say
Israel, with a population of around nine million, announced its first novel coronavirus case on February 21.
Since then, it has confirmed more than 26,021 infections including 321 deaths, with 980 new cases in the past 24 hours.
Use of the security agency's phone-tracking abilities had been criticised by NGOs as an unjustified violation of privacy.
Shin Bet chief Nadav Argaman has also consistently urged cabinet to find an alternative.
Follow us on Facebook, Twitter and Instagram to stay connected