Joe Ousalice, 68, who served in the 1982 Falklands War, was stripped of a long service and good conduct medal after revealing his sexuality during a court-martial hearing in 1993.
Gay people were not allowed to serve in the British military until a rule change in 2000.
"Back in 1993, because of his sexuality, Mr Ousalice was treated in a way that would not be acceptable today and for that, we apologise," a Ministry of Defence (MoD) spokesperson said.
Ousalice was a radio operator who served in the Royal Navy for 18 years - including in the Falklands, the Middle East and Northern Ireland.
US military in crisis — suicide, sexual assault and substance abuse
He was awarded the long service and good conduct medal in 1991, and the ministry said it would now return it to him "in person".
"We accept our policy in respect of serving homosexuals in the military was wrong, discriminatory and unjust to the individuals involved," the ministry said.
Ousalice said that after his court-martial someone used scissors to cut off his medal.
"I should have always been judged on the basis of my exceptional service and not my sexuality," he said.
"So many LGBT people were forced out of their wonderful careers and the consequences were devastating. It has taken me 27 years to resolve this and I had to take the MoD to court to get here."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ