The law, seen by critics as targeting leftist groups that campaign for Palestinian rights, was passed in a 57-48 vote following a lengthy debate.
"The law wishes to deal with the phenomenon of NGOs which represent foreign interests of foreign states, while acting under the cover of local organisations seeking to serve the interests of the Israeli public," its introduction read.
Prime Minister Benjamin Netanyahu said the law's goal was "to prevent an absurd situation, in which foreign states meddle in Israel's internal affairs by funding NGOs, without the Israeli public being aware of it."
Earlier versions of the law had included the requirement that representatives of applicable NGOs must wear identifying tags and declare their funding sources when speaking at a Knesset, or parliament, committee.
More From This Section
Opposition head Isaac Herzog said ahead of the vote that the law represents "the buds of fascism blooming in Israel."
Head of the Arab Joint List Ayman Odeh said the law sought to "intimidate and wipe away the few organisations that act and fight in the public sphere for equality to the Arab public."
Several left-wing Israeli NGOs receive large percentages of their funding from abroad, including from European governments.