Rafer Alston also hit a late 3-pointer and scored 13 points as the Rockets won their fourth straight game despite an injury to McGrady.
The six-time All-Star bruised his left hip in a first-half collision and seemed affected the rest of the game, scoring only eight points on 4-of-14 shooting. He also had seven assists.
"Whatever it was, it was a painful hit," McGrady said. "It was tough for me to breathe, every step that I took."
The Timberwolves trailed most of the game, but tied it at 68 on Troy Hudson's 3-pointer with 4:53 left. McGrady said his injury threw off his shooting, so Battier stepped up to make the clutch shots down the stretch.
Battier swished an off-balance 3-pointer with 3:39 left to put Houston up 71-68, then made another one 40 seconds later to help the Rockets avoid their recent trend of fourth-quarter meltdowns.
"Injuries are part of the game," Battier said. "What we have to do a better job of is, when he goes out of the game, not to let up. We need to be strong and say, 'OK, guys, we've got some pretty good players. Let's keep it up."'
Alston, who missed eight of his first 10 shots, made a steal after Battier's second 3-pointer, then finished the resulting possession with a 3-pointer from the top of the key to put Houston up 77-70.
"That's what I thought about all summer," said Alston, "to play good just in case Yao or Tracy aren't playing at their best, or are out. We have to be a better team in those cases."
The Timberwolves have fallen into the exact opposite pattern as the Rockets -- they trail early, then play their best in the fourth quarter. On Monday night, they trailed by 15 entering the fourth quarter in Dallas, then mounted a 17-2 run to tie the game before losing 93-87.
This time, the Timberwolves shut down Yao and McGrady late, but were beaten by the Rockets they didn't count on to make big shots.
"In the fourth quarter, we did what you want to do with your defense," Garnett said. "We made them go from their first option to their third and fourth options. But then when they went to their fourth, Battier hit those big shots. If he doesn't make those, we're still in the game."
Houston snapped a four-game losing streak to the Timberwolves at home and won for the ninth time in 11 games.
The Timberwolves committed 20 turnovers and were outrebounded 40-37.
The Rockets play in Phoenix on Wednesday and McGrady isn't sure he'll be able to play.
He had four assists in the first quarter, then was hit in the ribs by Mike James and went to the bench with 3:53 left.
As the second quarter began, McGrady gingerly walked behind the bench and held his side as trainer Keith Jones watched. But the Rockets maintained a slim lead without him, taking a 26-21 lead after Luther Head's 3-pointer.
McGrady returned with 8:46 left in the half and promptly hit a jumper from the free throw line. But he missed two more jumpers -- part of a 1-for-8 start -- and bent over during play stoppages.
McGrady went to the bench again with 4:25 left in the first half and held his left hip as he walked to the locker room with Jones.
Without McGrady, Yao carried the Rockets to a 36-31 halftime lead, scoring 12 points and grabbing six rebounds in the first half.
Garnett scored 12 in the first half, but none of his teammates had more than four.
McGrady started the second half, missed a jumper, then threw an errant pass that James, a former Rocket, converted into a layup.
The Timberwolves pulled to a 39-all tie before Yao scored twice to rebuild a four-point Houston lead. Yao was 7-for-10 from the field at that point, while the rest of the Rockets were 10-for-44.
Houston led 62-56 when McGrady returned with 9:17 remaining. McGrady hit a hanging mid-range jumper two minutes later to put the Rockets up 64-58, but Hudson's second 3-pointer in three minutes tied it.
Battier answered with consecutive 3-pointers from the corner and Alston added a 3-pointer with 2:16 left as the Rockets rediscovered their shooting touch just in time.
- Rockets F Chuck Hayes tied a season high with 11 rebounds and guarded Garnett most of the game.
- Both teams mustered season-low point totals in the first half.
- Garnett reached double figures for the 336th consecutive game, the ninth-longest streak in history. He's two games away from tying his own record (338), set between October 1997 and February 2002.