Jordan Hill had 17 points and 13 rebounds for the Rockets, who had a 56-38 edge on the boards. Williams also had nine rebounds.
Manu Ginobili and DeJuan Blair scored 16 points apiece for the Spurs. Tim Duncan and Tony Parker sat out for San Antonio.
Houston led 51-36 at halftime after the Spurs went 8 for 40 from the field in the half. Ginobili went 2 for 10 in the first half.
The Rockets pushed the margin over 20 in the third quarter. The Spurs rallied, but a Houston lineup of reserves led by Williams held on for the victory.