The Mavericks welcomed star forward Dirk Nowitzki for his first action of the season and he inspired Dallas to as much as an 11-point lead in the third period.
Oklahoma City then rallied behind a 40-point performance from Kevin Durant and appeared to have the game won in regulation before the Mavericks' Darren Collison hit a 3-pointer at the buzzer to force an extra period.
Dallas built a 104-101 lead in overtime, but Westbrook then took over while making a dunk, a jumper, a layup and two free throws as Oklahoma City was putting the game away.
Oklahoma City ended a two-game skid while the Mavericks lost their fourth in a row.
Nowitzki had been out all season following arthroscopic knee surgery. The 2011 championship series MVP came off the bench to play 23 minutes and score nine points.
Durant came within one point of reaching his season high. He made 13-of-28 shots from the field and all 10 of his free throws.
Serge Ibaka added 19 points and 17 rebounds while Westbrook produced 16 points with six rebounds and 10 assists.
Collison led Dallas with 32 points.