Houston had a 15-point lead before the Thunder scored 13 straight points to come within 100-98 with 4 1/2 minutes remaining.
Gallinari and Dennis Schroder, who scored 17 of his 23 points after halftime, carried the Thunder after the break.
The Thunder turned the game on its head with a blistering two-way performance, locking up the Rockets on defence as they roared back into the game.
Oklahoma City used a 6-0 run, highlighted by a dunk from Shai Gilgeous-Alexander after he stole the ball from Harden, to put the Thunder up 108-105 with about a minute left.
Despite being blindsided in a summertime trade to a non-championship contender, veteran Chris Paul is apparently not willing to leave Oklahoma City - even if it means a better shot at his first National Basketball Association title.
Gallinari added another 3 that pulled the Thunder even before Schroder completed the rally with another driving layup, a pair of free throws, and a pull-up jumper in the lane over Harden to lift the Thunder to a 110-107 lead with 28.1 seconds left.
The Parasite Cast Gets Standing Ovation at 2020 SAG Awards
BTS' V was strolling around Los Angeles with his new bestie Choi Woo Shik and it's a wholesome start to our week. Walking down the handsome streets of LA, V congratulated him on his win.
To screen passengers for new China coronavirus at 3 airports
A third person was confirmed to have died, and in Wuhan 136 new cases were found at the weekend, the local health commission said. Since then, Japan reported its first case of the infection on Thursday after a Japanese man returned from visiting Wuhan.
Half-Life series free-to-play via Steam until Half-Life: Alyx release
Still, any excuse to play Half-Life , whether at a discount or for free, is a good excuse. Now you can get up to date on this older series before it makes its big comeback.
Harden still finished with 29 points but needed 29 shots to in order to reach that mark and shot just 9-of-29 from the field, including 1-of-17 from 3-point range.
He managed just five points in the fourth quarter on 2-of-5 shooting.
Westbrook scored a game-high 32 points to go along with 12 assists and 11 rebounds. The 146 of his career, second only to the great Oscar Robertson.
In Monday night's loss to OKC, Westbrook tallied another triple-double.
The Rockets play four of their next five games on the road, with a tough stretch of games against the Denver Nuggets (twice), Minnesota Timberwolves and Utah Jazz, before taking on the Dallas Mavericks at home.
The Thunder saw Houston go on an 18-2 run to end the first quarter and into the second quarter.