The vote was 77 in favour, 51 against with 46 abstentions.
The resolution on Friday expressed "serious concern at the continuing use of torture and cruel, inhuman or degrading treatment or punishment" of detainees as well as "public executions, violations of the human rights of ethnic and religious minorities and intimidation and persecution of human rights defenders".
It also called on Tehran to ensure "full respect for the rights to freedom of assembly, opinion and expression", to "eliminate, in law and in practice, the use of torture and cruel, inhuman or other degrading treatment or punishment such as amputations and flogging", and "to abolish public executions and other executions carried out in the absence of respect for internationally recognized safeguards."
The resolution also cited "continuing harassment, intimidation and persecution of human rights defenders, non-governmental organizations, political opponents, religious dissenters, journalists, academics and web bloggers."
Unlike those of the Security Council, resolutions passed by the General Assembly are not binding.
"The vote was a little narrow for comfort ... It was a victory for the Iranian people," US deputy ambassador to the UN Anne Patterson told reporters. "We hope that the Iranian people get the message that the international community is with them."
"There is one single standard for human rights in the world and it cannot be adapted. That applies to Canada and any other country"
Canada's UN envoy
"The government of Iran should be singled out," said Canada's UN envoy Allan Rock. "Their record on human rights is unacceptable."
Rock, whose country was a key sponsor of the resolution along with the European Union and the United States, dismissed accusations by several other UN members that Ottawa was selective in its condemnation of human rights.
"There is one single standard for human rights in the world and it cannot be adapted. That applies to Canada and any other country," Rock said.
Last month, Canada said it planned to introduce the resolution at the UN to address Tehran's "poor regard for human rights".
Kazemi died while in custody
Canada's move was the latest volley between Ottawa and Tehran in a relationship strained since 2003 by the murder in Iran of Canadian-Iranian photographer Zahra Kazemi.
Kazemi, who was 54, died while in custody after being arrested for photographing a demonstration outside a Tehran prison.
Iran's judiciary has called for a new probe into the murder of Kazemi after acquitting an intelligence agent initially accused of the crime, the agent's lawyer said on Wednesday.
Friday's UN assembly resolution was adopted despite an Iranian motion to prevent a vote. That motion was defeated in a vote of 77 against, 70 in favour and 23 abstentions.
Among the 70 countries which sought to prevent a vote on the Iran resolution were Belarus, Cuba, Indonesia, Malaysia, Myanmar, Uzbekistan, Russia, Turkmenistan, Venezuela and Zimbabwe.