The European Court of Justice said that "foodstuffs originating in the territories occupied by the State of Israel must bear the indication of their territory of origin."
The Luxembourg-based court said when products come from an Israeli settlement, their labeling must provide an "indication of that provenance" so that consumers can make "informed choices" when they shop.
The EU has consistently spoken out against Israeli settlement expansion, saying it undermines the hopes for a two-state solution by gobbling up lands claimed by the Palestinians.
Israel says the labeling is unfair and discriminatory and says other countries involved in disputes over land are not similarly sanctioned.
The EU wants any produce made in the settlements to be easily identifiable to shoppers and insists that they should not carry the generic "Made in Israel" tag.
Israel captured the West Bank and East Jerusalem in the 1967 Six-Day War and began settling both areas shortly afterward. The Palestinians claim both areas as parts of a future state, a position that has global support.
The international community opposes settlement construction and many countries consider them illegal. Today, nearly 700,000 Israelis live in the two areas, almost 10% of the country's Jewish population.
The ECJ underlined that settlements "give concrete expression to a policy of population transfer conducted by that State outside its territory, in violation of the rules of general international humanitarian law."
It said any failure to identify the point of origin of produce meant that "consumers have no way of knowing, in the absence of any information capable of enlightening them in that respect, that a foodstuff comes from a locality or a set of localities constituting a settlement established in one of those territories in breach of the rules of international humanitarian law."
Human Rights Watch welcomed the ruling. The rights watchdog's EU Director Lotte Leicht said it's "an important step toward EU member states upholding their duty not to participate in the fiction that illegal settlements are part of Israel. European consumers are entitled to be confident that the products they purchase are not linked to serious violations of international humanitarian law."
In Israel, Professor Eugene Kontorovich, director of International Law at the Jerusalem-based Kohelet Policy Forum, said "the European Court is approving putting a new kind of 'Yellow Star' on Jewish-made products."
"This blatant discrimination makes it more urgent than ever for the Trump administration to defy Brussels by making official what has long been U.S. practice, to allow these products to be labelled 'Made in Israel'," said Kontorovich.
It's not entirely clear how the ruling will be enforced.
European retailers would normally be expected to do the labelling, but the real origin of the produce is not always easy to identify, experts say.
The case came to court after an Israeli winery based in a settlement near Jerusalem contested France's application of a previous ECJ court ruling on the labeling. That ruling backed the use of origin-identifying tags but did not make them legally binding.
The winery and the Foreign Ministry had no immediate comment on the ruling.