Up five shots through 54 holes, Westwood stumbled to a final-round 73, bogeyed two of his last three holes and missed a birdie opportunity on the 72nd green that would have ended matters in regulation.
Instead, Westwood needed 73 holes to lock down the win.
This is the fifth year the Indonesian Masters has been an event on the Asian Tour calendar and the third time Westwood has walked away with the trophy.
"It was a tough day out there ... but [I] managed to battle back," Westwood told reporters. "Its nice to have won here three times. Its a good hat trick."
Nirat started the day a whopping seven shots behind Westwood but forced a playoff with a birdie on his final hole for a 6-under 66. The 31-year-old from Thailand entered the week 218th in the Official World Golf Ranking and in search of his fifth career Asian Tour victory.
Other notable names in the top 10 include European Ryder Cupper Thomas Bjorn (4) and 2009 PGA Champion Y.E. Yang (T-5).