But he was still blasted by some Twitter users for qualifying his support.
However, it marks a step forward from the policies of the Helen Clark-led Labour administration, which refused to consider legislation allowing gay marriage.
Green Party co-leader Russel Norman said he supported gay marriage.
He did not understand why Mr Shearer had qualified his statement, as any legislation would be " pretty straightforward", he said.
"If gay people want to get married then they should be allowed to.
"Seriously, it's pretty straightforward. I don't see why your sexual preference should be any barrier to marriage. It's no big deal."
Prime Minister John Key could not be reached for his views on gay marriage.
However, he has previously refused to answer questions on the topic - most recently during a 2011 appearance at the Big Gay Out.
Radio host Steven Oats invited Mr Key to his stall and asked whether he would support civil unions in a conscience vote.
"I'm leaving it until my book. I know the answer, but just wait until my book," Mr Key said.
President Obama revealed his support for gay marriage in an interview with an ABC interviewer this morning (NZ time).
It marked a change in his stance after previously saying he was "evolving" on gay marriage - a fiercely divisive issue in US politics.