Brazil won the first two sets (25-18, 26-24) before the Thais earned the third (25-23).
The Brazilians then won the match after winning the fourth (25-23), reports the Bangkok Post.
"It was an exciting match," Pimpichaya Kokram said after the match.
Thailand coach Danai Sriwatcharamethakul said: "Our players have learned a lot from them."
Thailand lost to the Dominican Republic on Thursday. They will take on Italy today. (Game starts 8:15pm Thailand time).
The Thais still stay at eight in the standings. Only top seven teams will play in next month’s finals, along with the host Turkey.