“I had a fear people would judge me and treat me like a leper because of a lack of knowledge," he says. "I was in a dark place, feeling suicidal. I thought about driving off a cliff."
But when he emerged from the sea during the Wales Ironman challenge in Tenby on Sunday, he showed the nation that being diagnosed with HIV does not mean the end of a happy and fulfilling life. After completing his two-mile swim, the 45-year-old clambered onto his bike and completed a 112-mile cycle ride.
There are thought to be approximately 101,000 people in the UK who carry the HIV virus. While a generation ago that may have meant rapidly developing symptoms and a limited lifespan, advances in medication mean that people today can live normal lives for many decades if the virus is spotted soon enough.
Amardeep Singh, lead pharmacist for HIV at Sandwell and West Birmingham Hospitals Trust, says the fact that Thomas decided to reveal his condition after being blackmailed said much about the attitudes which still persist.
"In 2019, people are getting blackmailed because they have an illness," he says.
Mr Singh says while the implications of an HIV diagnosis had changed considerably since the condition first came to public notice in the 1980s, people's perceptions of the condition have not moved with the times.
"The UK has possibly the best HIV care in the world, and well over 90 per cent of our patients respond well to treatment, and can expect a normal life expectancy," he says.
But Mr Singh says that when people are told they have the virus, their first reaction is still largely the same as it was 30 years ago.
"I have seen that reaction so many times from people, the news is usually met with some degree of shock or fear.
"A lot of the stigma is based on information that is 30-40 years old. This information was necessary at the time, but it hasn't aged well."
Joanne Carwadine, a Shrewsbury-based psychotherapist, tells a similar story, saying there is still a perception among the public that HIV is something to be feared.
"There have been such major breakthroughs in medication in respect of Aids and HIV, and these breakthroughs mean people can have a full and normal life, but the stigma is still there," she says.
"It's fear-based, people are frightened of something they don't understand.
"If they think they have a chance of them catching it they are going to be frightened of it."
Mrs Carwadine recalls how in the 1980s there was all manner of speculation about how the disease could be transmitted.
"People were talking about catching it from toilet seats and nonsense like that, and some of that is still around," she says.
"It's very important that people speak about it.
"When someone like Gareth Thomas comes forward it does make a positive difference."
Mrs Carwardine says that the pop star Sir Elton John has also done great work across the world in educating people about the illness.
One of the first public figures to reveal they had the virus was former cabinet minister Chris Smith. In 2005 he revealed he had been living with the condition for 17 years. Now aged 68, he continues to be an active member of the House of Lords more than three decades since his diagnosis.
Mr Singh says other public figures, such as the basketball star Magic Johnson and actor Charlie Sheen, demonstrate it is possible to live a normal life after diagnosis.
Thomas himself admits he thought his life was over the moment he was told he had the virus following a routine health check.
"I’d had the tests every now and again and they’d always come back okay. I didn’t feel ill and I thought everything was going to be fine," he said over the weekend.
“The woman who did the test took blood as usual, then I went out to my car and waited for about an hour before going back in to get my results.”
"I sat down on a chair next to a doctor’s bench. She told me in a quite matter of fact way I had tested HIV positive.
"When she said those words I broke down. I was in such a state. I immediately thought I was going to die.
"I felt like an express train was hitting me at 300mph. I wasn’t expecting it at all. Then I was thinking 'how long have I got left?' I was distraught."
Thomas is reluctant to say precisely when he was diagnosed with the condition, but said he has been living with HIV for some years.
HIV – Human Immunodeficiency Virus – is a condition that attacks the body's immune system, reducing its ability to fight back against what are normally quite minor illnesses.
The virus stays in the body for life, but treatment can keep it under control and protect the immune system. However, if untreated it can develop into Aids, the most advanced stage of the HIV infection when the immune system is not longer able to fight off infections.
Ian Green, chief executive of Aids and HIV charity the Terrence Higgins Trust says it is hugely beneficial when somebody such as Thomas can be seen living a healthy and active life.
"I’m very proud to call Gareth Thomas a friend," he says.
"Gareth is proof that an HIV diagnosis shouldn’t stop you from doing anything you want to do, whatever that is."
Mr Green says he hopes that by speaking publicly about his condition, Thomas will help transform attitudes towards HIV that are all too often stuck in the 1980s.
"We’ve made huge medical advances in the fight against HIV that means that people living with HIV like Gareth now live long healthy lives," he says.
"We can also say without doubt that those and on effective HIV treatment can’t pass on the virus.
"Gareth blazed a trail by being the first rugby player to come out as gay and has done so much to encourage inclusion and diversity within the sport.
"Now he is doing that once again with HIV and taking on the challenge of a lifetime in Ironman Wales to show that this virus doesn’t need to be a barrier when you’re diagnosed and accessing treatment."