The resolution, put forward by Israel and Germany, was passed without a vote by the 193-member General Assembly.
The move sends "a strong... message against the denial or the distortion of these historical facts", the UN said.
Six million Jewish people died in the Holocaust - Nazi Germany's campaign to eradicate Europe's Jewish population.
On Thursday, the UN General Assembly said it "rejects and condemns without any reservation any denial of The Holocaust as a historical event, either in full or in part".
"Ignoring historical facts increases the risk that they will be repeated," Germany's UN Ambassador Antje Leendertse said.
The text commends nations that preserve sites that once served as Nazi death camps and concentration camps and urges member states to provide educational programmes on The Holocaust.
Germany's Foreign Minister Annalena Baerbock and her Israeli counterpart, Yair Lapid, said in a joint statement they were concerned by a recent dramatic increase in Holocaust denial.
The resolution lists distortion or denial of The Holocaust as:
* Intentional efforts to excuse or minimise the impact of The Holocaust or its principal elements, including collaborators and allies of Nazi Germany
* Gross minimisation of the number of the victims of The Holocaust in contradiction to reliable sources
* Attempts to blame the Jews for causing their own genocide
* Statements that cast The Holocaust as a positive historical event
* Attempts to blur the responsibility for the establishment of concentration and death camps devised and operated by Nazi Germany by putting blame on other nations or ethnic groups
While the resolution was adopted by the UN General Assembly, Iran - a member of the organisation - said it was disassociating itself from the text.
When the Nazis came to power in 1933, they began to strip Jewish people of all property, freedoms and rights under the law. At the Wannsee Conference in Berlin in January 1942, the Nazi leadership decided to exterminate the entire Jewish population of Europe, and deportations of Jews to extermination camps began.