The Canadian-drafted measure Friday was passed 77-51 with 46 abstentions.
"It has been brought forward because we believe the United Nations must send out a sustained message that we have expectations of real change," said Allan Rock, Canada's ambassador to the United Nations.
The resolution called upon the Iranian government to "end the harassment of political opponents and human rights defenders."
Tehran has a history of intimidating those who speak out on human rights issues. In August 2005, Human Right Watch, a non-governmental rights-monitoring organization said the Iranian government arrested prominent lawyer Abdolfattah Soltani and threatened Nobel laureate Shirin Ebadi.
The resolution also called upon the nation to ensure "full respect for the right to due process of law including access to counsel by those detained."
In particular, the resolution decried executions of people under the age of 18.
Human Rights Watch said Iran executed at least four juvenile offenders in 2004 and up to thirty juvenile offenders are on the country's death row.
Citing Iran's discriminatory practices, the resolution urged Iran to adopt policies that eliminate discrimination of women and religious minorities.
In August, Human Rights Watch registered the deaths of 17 Kurds at the hands of security forces in Iran's Kurdish region.
Deputy U.S. Representative to the United Nations, Ambassador Anne Patterson, said, "It's quite a victory for the Iranian people because it brings to life the fact that there's no free expression in Iran."
Patterson expressed concern over the narrow vote margin. Many Muslim countries including Algeria, Afghanistan, Azerbaijan, Bangladesh, Pakistan and others voted against the resolution.