Rights groups say the legislation stifles freedom of speech and compromises Israeli democracy.
After failed attempts to delay debate, it was voted through 47-36.
It follows several Israeli calls to boycott institutions or individuals linked to Jewish settlements on occupied Palestinian land.
The settlements are deemed illegal under international law, although Israel disputes this. Recent peace talks with the Palestinians were derailed over the issue of continued building in settlements.
The Palestinians want the West Bank as part of a future state.
Among the recent initiatives that angered settlers and their influential political patrons was a pledge by Israeli academics and artists to boycott the West Bank settlement of Ariel.
Israeli developers also agreed not to use products or services from settlements when they signed on to help build a new modern Palestinian city, north of Ramallah.
Under the new law those who sponsor a “geographically based boycott” - which includes any part of the Jewish state or its settlements - could be sued for damages in a civil court by the party injured in the boycott call.
The petitioner is not required to prove that “economic, cultural or academic damage” was caused, only that it could reasonably be expected from the move.