The Constitutional Tribunal rejected a former inmate's appeal in a lawsuit against prison authorities who suddenly stopped his weekly conjugal visits to his partner, a current inmate he met when both served time in the same jail.
The high court's brief ruling said the prison authorities' decision "falls within the scope of their rights, duties and powers."
The court, however, is still debating another appeal in a similar case that challenges prison rules restricting conjugal visits to heterosexual couples as violating the basic right to sexual freedom of all inmates, including homosexuals.
The high court's ruling could also be affected if Congress votes and passes bill currently under debate that would legalize gay marriage.
Meanwhile, the country's Supreme Electoral Tribunal is considering a request to hold a referendum on gay marriage so the Costa Rican people can decide on the matter.
Same-sex marriage is legal in six countries -- Netherlands, Belgium, Canada, Norway, South Africa and Spain -- and is a top issue in the United States, where Massachusetts in 2004 became the first US state to allow it, followed by California this year.