The U.N. resolution was approved with 128 "yes" votes, nine "no" votes, and 35 abstentions.
Before the vote, Trump and his U.N. ambassador, Nikki Haley, had threatened to cut off aid to member states that voted in favor of the resolution.
Speaking before the resolution was approved, Haley said: "The United States will remember this day in which it was singled out for attacks in the General Assembly for the very act of exercising our right as a sovereign nation. We will remember it when we are called upon to once again make the world's largest contribution to the United Nations."
Earlier this month, Trump reversed years of U.S. policy in recognizing Jerusalem as the capital of Israel. The decision led to anger and protests from Palestinians and across the Arab world.
Israel considers Jerusalem its indivisible capital and wants all embassies based there. Palestinians want the capital of an independent Palestinian state to be in eastern Jerusalem. Israel captured that area in the Six-Day War in 1967. However, the move was never recognized internationally.
On Thursday, an aide to Palestinian President Mahmoud Abbas thanked countries that voted in favor of the resolution despite, in his words "all the pressure exerted on them."
Israeli Prime Minister Benjamin Netanyahu said he completely rejects the "preposterous" U.N. resolution. He said in a video published on Facebook that Jerusalem "always was, always will be Israel's capital." He also thanked Trump for his defense of Israel.
While Thursday's vote was a victory for Palestinians, fewer U.N. members voted "yes" than expected. Observers had predicted at least 150 "yes" votes.
The United States vetoed a similar draft resolution on Monday in the 15-member U.N. Security Council. The remaining 14 members voted in favor of it. However, the U.S. used its veto power to block its adoption.
Haley said after Monday's vote, "The United States will not be told by any country where we can put our embassy." Trump has said he plans to move the U.S. embassy in Israel from Tel Aviv to Jerusalem.
Haley also warned other countries in a letter before Thursday's vote. At the U.N., several diplomats said they had received Haley's letter, but did not plan to change their position.
Thursday's emergency General Assembly session was requested by Palestinian envoy Riyad Mansour. Mansour said he hoped the measure would receive "overwhelming support."
General Assembly resolutions are non-binding. Rather, they demonstrate the majority opinion of the international community.
I'm Ashley Thompson.