Australia's House of Representatives backed a bill to change the definition of marriage from a union between a man and a woman to "a union of two people".
"It means that we've created an Australia that is more equitable, it's more fair, it's more just", he added.
Couples will shortly be able to register for marriage, but will have to wait 28 days before being able to marry.
The result is a political win for Turnbull, who became prime minister after deposing Abbott in 2015 in an internal government leadership ballot.
Appropriating Ecclesiastes 3, Shorten said there was a season for everything: "It is now a time to heal, a time to build, a time to laugh, a time to embrace, a time to love and now, at last, a time for marriage equality". It changes the definition of marriage from exclusively between a man and a woman to "a union of two people" excluding all others. Leading "no" campaigner Lyle Shelton said it was "deeply disappointing" day.
Pope, UN, EU, others criticize Trump for recognizing Jerusalem as capital
Pope Francis also had a discussion, regarding the moves being made by the United States, with Palestinian President Mahmoud Abbas on Tuesday.
One of those who voted against the legislation, Queensland MP Keith Pitt, said he did not support the Bill because "I believe it does not adequately address the concerns of many in my electorate around religious freedoms, parental choice and the right for parents to raise their children as they see fit". Queues of people lined up to watch the debate from the public gallery, with some dancing and cheering.
Several parliamentarians who supported the changes wore rainbow-coloured socks or ties, including Warren Entsch, described in local media as a "fiercely heterosexual... crocodile-farming, bull-catching Liberal".
"This bill will take from no-one; it simply makes our nation a kinder and a fairer place", Entsch told parliament this week.
Amendments meant to safeguard freedoms of speech and religion for gay-marriage opponents were all rejected, though those issues may be considered later.
Same-sex marriage is now recognised in more than 20 countries, of which 16 are in Europe.