Yao also had 14 rebounds and five assists. Rafer Alston and Von Wafer scored 18 points apiece and the Rockets went 13-of-21 from 3-point range to hand the Warriors their eighth straight loss.
Stephen Jackson scored 26 points before getting ejected with 1:35 left. Corey Maggette scored 23 points, and Jamal Crawford added 22 for the Warriors, who shot 54 percent (45-of-83) from the field, but got outrebounded 44-33.
Golden State coach Don Nelson was ejected late in the third quarter and Houston finished the game with a 30-11 run to reach a season-high point total.
Yao's three-point play with 7:14 left broke a 101-101 tie, and Alston drove for a layup to stretch Houston's lead to five. Yao scored on the Rockets' next trip down to match their biggest lead at seven.
The Warriors shot close to 60 percent through the first 3 1/2 quarters, then had only one field goal in a 3-minute span as Yao and the Rockets finally pulled away.
Yao put back Artest's miss with 5:26 left, and Battier sank two free throws with 4:45 to go to push the lead to 114-103. Golden State never threatened again and Jackson was tossed for arguing a foul call.
Golden State shot 60 percent (12-of-20) from the field in the first quarter and led 32-30. Artest scored 12 points in the quarter to lead Houston.
The Warriors hit seven of their first eight shots in the second quarter, while Wafer scored the Rockets' first seven points to keep them close. The seldom-used shooting guard hadn't scored more than 10 in a game this season.
Jackson hit his first seven shots and put Golden State up 45-39 with a layup. Luther Head, Aaron Brooks and Carl Landry finished fast breaks with layups over the next minute to tie the game.
Turiaf, third in the league in blocked shots, picked up his fifth foul with 51.7 seconds left in the half and was replaced by Rob Kurz.
Battier hit his third and fourth 3-pointers in the last 38 seconds to give Houston a 62-57 lead at the break. Turiaf fouled out with 9:10 left in the third quarter, smacking Yao on a turnaround.
Later in the quarter, Nelson was ejected after protesting a foul call on Andris Biedrins. Biedrins was whistled after fighting Luis Scola and Yao for a rebound. Scola tipped in the shot, while Yao earned two free throws.
Nelson continued to scream at referee Bennie Adams during a timeout and Adams signaled another technical, an automatic ejection. Assistant coach Keith Smart took over on the Warriors' bench.
When play resumed, rookie Anthony Randolph was called for a technical foul after dunking on Yao and then saying something to the Houston center.
Houston led 88-84 after three quarters, even though all five Golden State starters were already in double figures. The Warriors opened the final quarter with a quick 9-2 run, but Yao's three-point play with 9:44 left re-tied it at 93-all.
Notes:@ Warriors G Kelenna Azubuike did not score in 5 minutes after sitting out Monday's loss to Miami with a sprained left foot. ... Artest had one steal and has at least one in 19 of 20 games this season. ... The Rockets are 69-6 when they score 100 points or more at the Toyota Center. ... Nelson was ejected for the first time this season. He was also thrown out of a game in Houston last season.