Teerasil Dangda gave the home team the lead after 26 minutes and Ali Mabkhout equalised for the visitors in the 45th minute.
Teenager Ekanit Panya made it 2-1 early in the second half.
In Tuesday night other Group G game of Asia's qualifying round for the 2022 World Cup, Vietnam won 3-1 against Indonesia, who are still looking for their first point of the campaign.
After three games, Thailand lead Group G with seven points and are ahead of Vietnam on goal difference.
The UAE, the top seeded team in the group, have six points and Malaysia three.
The eight group winners and four best runners-up advance to the continent's 12-team final qualifying stage for the Qatar World Cup.
At Thammasat Stadium, Thailand were without their influential midfielder Chanathip Songkrasin but welcomed back defender Theerathon Bunmathan.
Akira Nishino's men got off to a lively start and came close to opening the scoring inside the first five minutes as Teersasil saw his shot go over the bar.
Moments later Supachok's shot was saved by UAE goalkeeper Khalid Elsa.
The War Elephants were the better side throughout the first half and deservedly went ahead when Ekanit's cross perfectly found Teerasil, who headed the ball past Elsa in the 26th minute.
As Thailand squandered several scoring chances, they were punished in the final moments before the interval by Bert van Marwijk's men.
Thailand's defenders failed to clear a Saleh Easa cross and Ali Mabkhout's header beat Thailand goalkeeper Siwarak Tedrungnoen.
Thailand returned strongly in the second half and restored the lead in the 52nd minute when Ekanit scored with a beautiful volley.
Read original story here.