Kevin Durant scored five quick points to cut the Rockets' lead to two. James Harden missed two shots for Houston after that and the Thunder had a last chance.
Reggie Jackson missed a jump shot and Serge Ibaka grabbed the rebound, but missed a layup at the buzzer.
A stunned Ibaka fell to the court after the miss and covered his face with his hands.
Durant scored 38 points in Oklahoma City's second game without injured All-Star guard Russell Westbrook.
The victory kept Houston from being swept in the playoffs for the first time since 1996. Game 5 is Wednesday in Oklahoma City.
Harden scored 15 points, but also had 10 turnovers. He picked up his fifth foul with about seven minutes remaining, sending him to the bench. He had two chances to extend Houston's lead with less than a minute left, but missed both of them, including shooting an air ball.
Former Utah Jazz guard Derek Fisher made an apparent 3-pointer to cut Houston's lead to 104-101 with less than three minutes remaining. But it was reviewed a few seconds later and the points were taken away because replays showed the shot clock had expired.
Jackson finished with 18 points in his second start in place of Westbrook, and Kevin Martin added 16.
Hawks 102, Pacers 91
In Atlanta, Josh Smith scored a career playoff-best 29 points as the Hawks built a 17-point lead at halftime, then withstood an Indiana comeback to even the series with a victory in Game 4.
After struggling much of the second half, the enigmatic Smith made nearly every big play down the stretch. He swished a rare 3-pointer, came up with an offensive rebound to set up a 3 by Kyle Korver, and finished off a fast break with a right-handed dunk. Plus, he did another stout defensive job on Indiana star Paul George, who had to work for every one of his 21 points.
"When he plays like that," Hawks guard Devin Harris said of Smith, "we're a very good team."
Korver added 19 points off the bench, most of them coming on his specialty: the 3-pointer. He knocked down five from outside the arc, including the biggest one with 2:33 remaining after Al Horford threw up a wild shot that missed. Smith snatched one of his 11 rebounds and spotted Korver lurking all alone on the outside.