Unionists voted down a motion at Stormont's Assembly which called on the power-sharing ministerial Executive to legislate.
Northern Ireland is the only part of the UK without marriage rights for gay couples.
The issue sparked impassioned debate, with protests outside the legislature and verbal clashes between campaigners in favour of or opposed to the change. Amnesty International has warned of a likely legal challenge.
Sinn Fein South Down MLA Caitriona Ruane said: "Attitudes in Ireland are changing because people do not want to see people discriminated against.
"The gay community has said enough is enough, they are standing up for themselves and their communities."
She claimed young people were turning to suicide by because of the taunts.
"If they don't have an alternative voice to the vitriolic gay bashing they will internalise it," she said.
"There is no room for sitting on the fence on this, this is about fighting for all our children's rights."
Church leaders had urged Assembly members to vote against the legislation, with the Catholic church asserting marriage was between a man and a woman.
However, Patrick Corrigan, Amnesty's Northern Ireland programme director, said: "States may not discriminate with regards to the right to marry and found a family, on the basis of sexual orientation or gender identity."
Today's petition of concern at the Assembly tabled by the largest unionist party, the Democratic Unionists, ensured Sinn Fein's motion would be defeated after a majority of unionists failed to back the change.
John O'Doherty, director of the Rainbow Project health organisation for gay men and a rights campaigner, said he would continue to press for change.
"This will be won slowly so we appreciate every vote that we got. We are disappointed with the outcome. It has always been a difficult march towards equality here but we will continue to fight the good fight."
A
total of 95 members voted, 42 in favour including all nationalists.
Three unionists out of 50 voted Yes. Former Ulster Unionists Basil
McCrea and John McCallister voted Yes.
DUP Finance
Minister Sammy Wilson defended his party's veto and said colleagues
would use it again to defeat "reckless" legislation.