Dr Barry Morgan announced his new position in his last address to the Governing Body of the Church in Wales. He will retire from the position in January.
He said studying the Bible in its full context had led to a very different view of same-sex relationships than that traditionally held by the Church.
Currently same-sex weddings are not allowed in the Church in Wales.
In April the Church's bishops said it was "not yet ready to allow or bless same-sex marriage" but said "the debate is not over".
A pastoral letter from them said the Church should be a place where gay and lesbian people can be "honest and open, respected and affirmed".
Now the archbishop has gone a step further and endorsed same-sex marriage.
The Archbishop concluded his address by quoting from a book edited by Andrew Davidson, called Amazing Love: "Living for others underlines the truest meaning of sexuality.
"Christians have discovered that most people flourish best when this living for others finds its focus in a commitment to one other person: when a couple make a lifelong commitment within which sex properly belongs."
He added: "Those of us who were or are married have found that to be the case. Why would we want to deny such a possibility for those who are attracted to their own gender?"
The Bible had more than one view on homosexuality, he said, and to understand God's will meant seeing the different views in the context of the Bible as a whole.
"It absolutely will not do to quote texts from parts of the Bible in a simplistic way without reference to their contexts," he said.
He compared biblical interpretations of same-sex relationships with those of slavery - a practice once defended by the Church. As opinions on that changed, he suggested, so may the Church's view on same-sex relationships.
He added: "In spite of all the passages in favour of slavery, when you examine the Scriptures as a whole and the ministry of Jesus in particular, you realise it is about freedom from all that diminishes and dehumanises people.
"No Christian I hope would today argue that slavery is good, but for nineteen centuries the Church accepted it and defended it.
"God through His Holy Spirit has led us into the truth of seeing things in a totally different way today and we are rightly horrified when we read about people who have been kept as slaves by others."
Taking the Bible as a whole may lead us into a very different view of same-sex relationships than the one traditionally upheld by the Church, he suggested.
He rejected criticism that gay marriage was "abandoning the Bible" and insisted he was instead "trying to interpret it in a way that is consistent with the main thrust of the ministry of Jesus".
In April Dr Morgan refused to introduced a bill to the Church's governing body on gay marriage, saying it would fail.
Last year members of the governing body voted 61 in favour of allowing gay marriages, while 50 voted for no change and nine to allow blessings.
Despite having a majority it was not enough to approve a change in Church law.
Rev Dean Roberts is a Church in Wales curate and told Premier Dr Morgan does not speak for the whole Church.
He said the slavery example used by the archbishop does not stand up: "The Bible moves towards a negative view of slavery and there are passages of scripture that talk about how to treat slaves but we don't seem to see that about homosexuality.
"There are, of course, very clear passages in the Bible that condemn certain relationships."
He added: "Whilst being archbishop, and supposedly a force of unity for the Church in Wales, I don't think he's been able to hide his own intentions and desires on this issue.
"Maybe because he's retiring he's used this as his last push to put a change in canon law on same sex marriage back on the agenda."
Dr Barry Morgan speaking to Premier's Antony Bushfield:
Rev Dean Roberts speaking to Premier's Antony Bushfield: