Asia's top-ranked team were held 1-1 in the first half but conjured three goals after the break in snowy conditions at Saitama stadium.
"I thought it would make easier when we took the first goal, but we lost a goal soon after. It was really tough," said Japan coach Takeshi Okada. "We were very lucky when we took the second goal. We scored because my players were hungry for goals."
Japan went ahead through a Yasuhito Endo free-kick on 21 minutes, only for Narongchai Vachiraban to equalise with a sizzling shot just a minute later. The home team had to wait for more than half-an-hour before Yoshito Okubo pounced on a deflected clearance to restore their lead on 54 minutes.
Thailand's hopes of a recovery looked bleak when Narongchai received his second yellow card for pulling down Yuji Nakazawa. Nakazawa then leaped to head home a free-kick on 66 minutes to stretch Japan's advantage to 3-1, before substitute forward Seiichiro Maki completed the scoring in injury time.
The top two teams in the four-team round robin will move on to the final qualifying round which starts in September.