The Warriors shut down Yao Ming, forced plenty of turnovers (24) and shot well from 3-point range (16-of-35), all things Coach Don Nelson thought they needed to do to win.
But before all that, the Warriors got a boost when McGrady left the game with a back injury in the first half.
"The basketball gods were with us, because Tracy wasn't able to play," said Stephen Jackson, who scored 17.
Baron Davis had 25 points and 10 assists for the Warriors, who began the night 1½ games behind the Los Angeles Clippers for the final playoff berth in the Western Conference.
Golden State won for the 11th time in 14 games, but for only the ninth time on the road this season.
"We've still got seven more games we need to fight and win," said Richardson, who went 9-for-17 from the field and also grabbed nine rebounds. "We are having fun with it, we're celebrating. But we've got to keep fighting."
Luther Head hit seven 3-pointers and scored 30 points, both career highs, ably filling in for McGrady, who left in the first quarter with a stiff lower back.
But Yao was surrounded and smothered all night by Golden State's big men and had his worst game since he scored two points and broke his right leg against the Los Angeles Clippers in December.
With McGrady sidelined, the Warriors concentrated on swarming Yao and they succeeded in wearing him out.
"We were just trying to be very active on him," said 6-foot-9 Al Harrington. "He was frustrated. He was sucking his teeth the whole time. He knew what we were trying to do. He knew it was going to be a long night."
Golden State forced nine turnovers in the first quarter, most of them failed entry passes to Yao.
"We knew that they were going to front me," Yao said. "We were hesitant in the beginning of the game on the shot, on the drive, on everything."
The All-Star center finally broke free for a layup with 6:12 left in the opening quarter, but Richardson answered with a 3-pointer to put Golden State up 19-12.
McGrady missed his first three shots and went to the bench 7 minutes into the game. The Rockets initially said McGrady wasn't injured, then announced at halftime he was out for the game.
The Rockets started the night 1½ games behind Utah in the race for the No. 4 playoff spot in the West and home-court advantage in the first round.
McGrady said he was "questionable" for Friday's game against Portland. With the higher seed slipping away, McGrady said he may take extra time to make sure his injury heals.
"We're in (the playoffs)," McGrady said. "There's no question we're in. I'm not going to try to rush back at all until I'm ready."
The Warriors built a 10-point lead in the first half, but Rafer Alston and Shane Battier sank 3-pointers late in the half to cut Golden State's lead to 57-52 at the break. Alston scored 18 in the game.
The Warriors opened an eight-point lead in the third quarter, but Battier hit two 3-pointers and Alston scored on a breakaway layup to tie the game at 62.
Golden State ended the third quarter with a 15-4 burst, finished by Richardson's 3-pointer with 6.1 seconds left. Richardson tacked on two more 3-pointers early in the final quarter as the Warriors extended the lead to 90-74.
Head rallied the Rockets to within 10 with two more 3-pointers to match his career high. He swished one more with 3:53 left to cut Golden State's lead to 99-93.
Houston got within four before Jackson calmly sank a 3-pointer near the 2-minute mark to put Golden State up 103-96.
Juwan Howard hit a free throw with 1:48 remaining, but Davis swished a fadeaway 20 seconds left to put the game away.
Yao took only four shots, hitting two of them. He grabbed 11 rebounds, but was never a factor in the game's outcome.
"I was not totally ready and prepared to play against this team," Yao said. There was at least one man on me when I was without the ball, and there were at least two men on me when I did have the ball."
|The Warriors' Jason Richardson is a nightmare for the Rockets, scoring 27 points. (Getty Images)|
|Golden State (36-39) «||26||31||27||26||110|
|GS:J. Richardson 27 Pts
GS:J. Richardson 9 Reb
GS:B. Davis 10 Ast
|HOU:L. Head 30 Pts
HOU:C. Hayes 12 Reb
HOU:K. Snyder 4 Ast
|Players of the Game|
|J. Richardson, SG||40||9-17||2-3||9||1||2||27|
|M. Ellis, PG||40||6-12||1-1||5||1||1||14|
|B. Davis, PG||39||7-15||8-10||1||10||2||25|
|S. Jackson, SG||35||5-12||5-6||3||6||4||17|
|A. Harrington, PF||27||4-17||5-6||6||1||5||15|
|M. Barnes, SF||29||3-6||0-0||6||3||3||7|
|A. Biedrins, C||19||1-2||0-0||3||2||4||2|
|M. Pietrus, SF||10||1-1||1-1||2||0||2||3|
|A. Foyle, C||Did Not Play|
|Z. Cabarkapa, SF||Did Not Play|
|J. Powell, PF||Did Not Play|
|S. Jasikevicius, PG||Did Not Play|
|K. Azubuike, SF||Did Not Play|
|P. O'Bryant, C||Did Not Play|
|Complete Box Score|
|R. Alston, PG||42||7-17||0-0||4||3||3||18|
|C. Hayes, PF||39||4-4||0-0||12||2||4||8|
|S. Battier, SF||37||4-17||6-8||6||2||4||17|
|Y. Ming, C||31||2-4||5-5||11||1||3||9|
|T. McGrady, SG||7||0-3||0-0||2||3||0||0|
|L. Head, SG||28||10-13||3-3||6||2||4||30|
|K. Snyder, SF||21||2-9||3-6||3||4||0||8|
|J. Howard, PF||20||2-5||5-7||4||0||3||9|
|V. Spanoulis, PG||9||0-2||0-0||0||1||0||0|
|J. Lucas, PG||6||0-1||0-0||1||1||0||0|
|D. Mutombo, C||Did Not Play|
|B. Sura, PG||Did Not Play|
|B. Wells, SG||Did Not Play|
|J. Tsakalidis, C||Did Not Play|
|S. Novak, PF||Did Not Play|
|Complete Box Score|