The key was a strong defensive effort and other players picking up for Yao, who has missed 21 games since suffering a fractured right leg against the Clippers on Dec. 23. The Rockets are 15-6.
"We're in a nice little groove offensively right now," McGrady said. "My teammates have been great in providing offense as well and opening things up, allowing me to play one-on-one and have single coverage. When we are playing that way, that's when we are at our best."
McGrady led five Rockets in double figures as Houston won for the sixth time in the last seven games.
Memphis, which has the worst record in the NBA, has lost three straight.
"It's frustrating to lose period," Memphis guard Chucky Atkins said, "especially when you know you have opportunities to win."
Gasol also had five blocks and five assists.
Defense was the key for the Rockets and other players stepping up and providing leadership, coach Jeff Van Gundy said, from Dikembe Mutombo playing 37 minutes to McGrady's offense to Battier's discipline in guarding Miller.
"Shane did as good a job on Mike Miller as you can do," the Houston coach said.
Miller missed all eight of his shots from beyond the arc, breaking a franchise-record 27 straight games with a 3-pointer.
Battier, whose locker was right next to Miller's during his days with the Grizzlies, said the key was not to leave him.
"I've played against him enough to know you give him a foot and he can make you pay for it," Battier said of Miller, who had connected on 31-of-58 from outside the arc in the previous six games. "I'm glad we're done playing these guys this year because I don't know if I could chase him around for another 40 minutes."
Miller's problems were part of a 2-of-18 performance from 3-point range for Memphis, the 11 percent a season-low.
Houston, which built the lead to as many as 13 in the first half, let Memphis get within three points early in the fourth quarter.
But the Grizzlies could never get closer because they kept misfiring from the field, and Houston eventually got the lead back to 11 points with just under three minutes left.
"We were hanging in there," Gasol said, "even with the poor shooting. That's where we want to be. We weren't running as much, but as long as we're in the game and have a chance to win, I'm fine with it."
McGrady had 18 points in the first half to help Houston take a 54-43 lead at the break.
Memphis shot poorly early, missing its first six shots and connecting only a pair of dunks out of the first 11 attempts.
The Rockets initially couldn't take advantage of the Memphis shooting woes, but Houston began connecting in the early stages of the second quarter.
Gasol kept Memphis close, scoring 17 points in the first half.
"We kind of shut down their strengths," McGrady said. "That's making things tough for Gasol, not allowing him to get easy baskets and make him shoot jumpers. Staying with Mike Miller so when he comes off those screens, put two guys on him and make him give up the ball."
- The Rockets swept the season series from Memphis after the Grizzlies won all four games last season.
- Battier, who played his first five seasons in Memphis before an offseason trade to Houston, continues to receive a loud ovation when introduced at the FedExForum.
- Rockets G/F Bonzi Wells sat out the contest after injuring his lower back in Monday's victory over Minnesota.
- Gasol recorded his 10th double-double of the season.
- It was McGrady's 14th game of at least 30 points, including a streak of six straight earlier this season.
- New England Patriots kicker Stephen Gostkowski, who played collegiately at the University of Memphis, was among those attending the game.