The decision comes after a couple's two-year legal battle to seek state welfare credit, and means that the court has formally recognised the couple in the same way it would a married heterosexual couple.
The decision does not extend to other same-sex couples though, who continue to face opposition from lawmakers.
In Costa Rica, heterosexual couples are entitled to the benefit and the pair were angry it did not extend to same-sex partnerships and that gay couples had to have their cases decided on an individual basis.
The bishop of the city of Cartago, Jose Francisco Ulloa, was upset with the decision: "I agree that people with this special inclination have rights like any citizen, but these are never equal to a normal, natural marriage, like we have in Costa Rica between a man and a woman."
Lawmakers said it was important to look at the impact this could have on family law, the newspaper La Nacion said.
Cristian Zamora, one of those seeking the benefit, said: "I didn't think it was going to happen now since it was such a long process. It took us by surprise and it's a great victory ... not just for us but for the whole country."
The President Luis Guillermo Solis' attempts to legalise civil unions for all gay couples have been stalled by political opponents in the country's legislative assembly.
He has been a gay rights supporter and raised a rainbow flag at the palace to mark the International Day Against Homophobia and Transphobia a month after his election in 2014.