"We need protection of our civilian population", Palestinian UN envoy Riyad Mansour told the General Assembly before the vote, adding that the resolution was "intended to contribute to a de-escalation of the volatile situation".
The 193-member assembly approved the resolution by a vote of 120-8, with 45 nations abstaining.
The primary resolution was introduced by representatives in Turkey, on behalf of the Islamic Cooperation, and Algeria, on behalf of the Arab League.
"Advancing peace is not the goal of this resolution".
Former commander of the Gaza Division Brigadier-General Eyal Eisenberg has said Israel should change the way it deals with Hamas in the Gaza Strip. Israel accuses Hamas of trying to carry out attacks and damage the border fence under the guise of the protests.
The General Assembly largely ignored Trump's threats at the time to cut off aid to any country that went against the United States and voted 128-9 to denounce the US president's recognition of Jerusalem as Israel's capital and declare it "null and void".
"We can not remain silent in the face of the most violent crimes and human rights violations being systematically perpetrated against our people", Mansour said.
In December 128 countries defied President Donald Trump and voted in favor of a U.N. General Assembly resolution calling for the United States to drop its recognition of Jerusalem as Israel's capital.
"It is despicable for any country to even consider to vote for a resolution condemning Israel while refusing to support the condemnation of Hamas", he said.
Haley had argued that the amendment proposed by the U.S.
The U.S.' support for Israel during the recent uptick in violence on the Gaza-Israel border has been criticized by many human rights groups.
Human Rights Watch believes injuries and deaths of Palestinian protesters in the Gaza Strip, caused by Israeli soldiers' use of lethal force, may amount to war crimes and the officials responsible should face trial and sanctions.
Brett Bruen, a former Obama administration official and president of Global Situation Room, told CBS News at the United Nations on Wednesday that USA actions in the Middle East are "costly for Israel, which has grown further isolated" as the US irritates allies and emboldens adversaries.
As the General Assembly prepared for its final vote of the day, on the unamended resolution sponsored by Algeria and Turkey, it was already clear to stunned Arab delegates that one-third of the UN's 193 member states had joined the U.S. in condemning Hamas - and that many more chose to abstain, rather than vote against.
"By supporting this resolution you are colluding with a terrorist organization, by supporting this resolution you are empowering Hamas", Danon said.
Palestinians had been protesting near the Gaza border since spring, denouncing Israeli occupation and the blockade of the Gaza Strip, and also demanding the right to return to the areas they were expelled from in 1948, after Israel was established.