Signalling a major diplomatic victory for the Palestinians, the European-Union-backed resolution, pressing Israel to heed the recent World Court ruling and demolish the wall, was approved by a 150-6 vote with ten abstentions.
Among those who voted against were Israel and its staunchest ally, the United States.
The vote was delayed by hours of diplomatic haggling as current EU president, the Netherlands where the World Court is based, hammered out a common Brussels position on the latest UN salvo in the Israeli-Palestinian conflict.
Israel has already said it would ignore the ruling on 9 July by the International Court of Justice at The Hague and continue construction on the 700km separation wall, only a quarter of which has been built so far.
The court said Israel had to dismantle the parts of the controversial barrier that are built on Palestinian territory and pay the Palestinians reparations for damages.
The Palestinians have said if Israel does not comply, they will push for a legally binding resolution at the UN Security Council.
Resolutions adopted by the General Assembly have no legal force, but do reflect world opinion.
In December, the general assembly had asked the World Court for a ruling on the wall.
The barrier traps thousands of Palestinians, cutting them off from their villages, farms and schools.
Palestinians say the wall amounts to a land grab and will demarcate the borders of a future state.