It is also the first with a "large HIV epidemic" to eradicate mother-to-child transmission of the diseases. In 2014, an estimated 450,000 people were living with HIV in Thailand.
The disease is passed from mother to child either in the womb or during labor, delivery or breastfeeding, and if untreated, there is a 15-45% chance of the baby inheriting HIV from its mother.
If treatment -- in the form of antiretroviral medicine -- is given during the crucial stages, that chance is reduced to 1%.
On the 'way to AIDS-free' world
"To ensure children are born healthy is to give them the best possible start in life. It is immensely encouraging to see countries succeed in eliminating mother-to-child transmission of these two infections," said WHO Director-General Margaret Chan.
"This is a tremendous achievement -- a clear signal that the world is on the way to an AIDS-free generation."
The Thai minister of health was presented with a certificate of validation in a ceremony in New York.
"This is a remarkable achievement for a country where thousands of people live with HIV," said Poonam Khetrapal Singh, WHO regional director for Southeast Asia.
"Thailand's unwavering commitment to core public health principles has made elimination of mother-to-child transmission of HIV and syphilis a reality, a critical step for rolling back the HIV epidemic. Thailand has demonstrated to the world that HIV can be defeated."
The push to eradicate mother-to-child transmission is part of a larger health strategy implemented by the Thai government, which includes universal health care for its citizens.
According to the Thai health ministry, the number of women infected with HIV each year fell from 15,000 to 1,900 -- an 87% reduction -- from 2000 to 2014.
The United Nations General-Assembly High-Level Meeting on Ending AIDS
begins June 8.
UNAIDS Executive Director Michel Sidibe said Thailand had transformed the lives of thousands of women and children through turning around the epidemic.
As many as 21,000 babies are still born with HIV each year in the region, according to UNICEF's regional director, Karin Hulshof, who said Thailand's efforts in curbing the disease could be an inspiration for its neighbors.
Last year, Cuba was the first country to receive the validation. More recently Armenia has also eliminated HIV transmission from mother to child, and the Republic of Moldova eliminated syphilis transmission from mother to child.