Boston has won five straight since the All-Star break, including two in a row in overtime. Houston has lost four in a row.
Ray Allen scored 21, including a 3-pointer with 36 seconds left in the fourth quarter to give Boston the lead. But Rajon Rondo missed an open layup with a chance to clinch it in regulation, and Goran Dragic tied it for the Rockets.
Pierce scored seven points over a 2:05 span in overtime.
Luis Scola had 18 points and 14 rebounds, and Samuel Dalembert had 11 points and 17 boards for Houston.
The Rockets, who had been outrebounded in 10 consecutive games, grabbed 57 rebounds to 38 for Boston, which beat the New York Knicks in overtime on Sunday.
Garnett finished with 13,100 rebounds, one more than O’Neal.
Rondo had 12 assists, but all of his nine points came in the first quarter.
Houston trailed 57-47 with 8 minutes left in the third but outscored the Celtics 21-6 over the rest of the quarter. Boston made just one basket in the final 8:58 of the period, and just one in the first 7:16 of the fourth.
The Celtics trailed 80-70 with 5:33 left before scoring 14 of the next 16 points, taking advantage of back-to-back Houston airballs and 24-second clock violations and making it a three-point game, 80-77, on a fast break from Pierce to Rondo to Allen with 2:49 left.
Houston again ran down the 24-second clock, with Kyle Lowry forcing up a 30-footer at the buzzer. This one caught the rim and Dalembert got the rebound and made a layup. Pierce made two free throws, then Garnett grabbed another defensive rebound — tying O’Neal — and made a pair of free throws to make it 82-81.
Courtney Lee missed a scoop shot, and Allen got the rebound. The Celtics moved the ball up in transition and then Allen got the ball in the left corner, sidestepped Lee’s lunge and drained a 3-pointer to give Boston an 84-82 lead with 36 seconds left.
Scola missed again for Houston and Allen got the rebound. Rondo broke for the basket and got the ball with a clear shot, but he missed the uncontested layup. Scola hit Dragic for a long jumper to tie it.
Allen had a contested shot at the buzzer to win it in regulation, but it went off the rim.
Allen opened the scoring in overtime, and after Dragic’s jumper, Garnett gave Boston an 88-86 lead. Pierce then ran off seven straight Celtics points, starting with a three-point play that gave them the lead for good.
Notes: Pierce has played in 998 NBA games, third all-time on the Celtics. … Rockets coach Kevin McHale, a former Celtic, got a big cheer when he was shown on the scoreboard before the game. … Dalembert fouled out with 48 seconds left in overtime. … Houston fell to 8-3 against the Eastern Conference this season.