Sharing a picture of the former Wales and British Lions rugby captain on the Sussex Royal Instagram page, the Duke of Sussex commended him for his bravery, saying he was "saving lives" by speaking out.
"Gareth, you are an absolute legend! In sharing your story of being HIV+, you are saving lives and shattering stigma, by showing you can be strong and resilient while living with HIV," he wrote, alongside a picture of 45-year-old Thomas.
"We should all be appalled by the way you were forced to speak your truth, it is yours and yours alone to share on your terms and I and millions stand with you."
On Saturday night, Thomas posted a video on Twitter in which he spoke about his condition for the first time, explaining that blackmailers had threatened to disclose his diagnosis.
Thomas, who came out as gay in 2009, was told he had HIV, a virus that attacks the body's immune system, during a routine sexual health check-up.
He said that while the admission made him "extremely vulnerable," it did not make him weak.
"Even though I've been forced to tell you this, I choose to fight, to educate and break the stigma around this subject."
He added: "I am asking you to help me to show that everyone lives in fear of people's reactions and opinions... But that doesn't mean we should have to hide, but to do this, I really, really need your support."
Harry is well-placed to help Thomas challenge misconceptions about living with HIV.
He is co-founder of the charity Sentebale, which focuses on supporting HIV-positive young people in Lesotho. And in 2016, he took an HIV test on Facebook Live during a visit to London's King's College Hospital as part of his fight to eradicate the stigma surrounding the disease.
He said at the time: "We need to normalize testing and smash the stigma. We have a responsibility to ourselves, to the people, we are in a relationship with, the people that we love."
Harry's tribute to Thomas followed a message of support from his brother, Prince William. The Duke of Cambridge, who is patron of the Welsh Rugby Union, told followers on his Kensington Palace Instagram account: "Courageous as ever -- legend on the pitch and legend off it. You have our support Gareth. W."