Lin's layup with 6:44 left in the third pulled Houston to 70-60, but Foye's fourth 3-pointer bumped Utah's lead back to 13 points, and Jefferson sank a pair of free throws to make it a 15-point lead.
A 6-0 Houston run, capped by Greg Smith's jam, got Houston within 75-66. Utah closed the third on a 10-4 run, capped by Hayward's three-point play after a driving layup at the buzzer.
"It's hard, especially on the road, when you get down that big," said Houston forward Chandler Parsons, who finished with 11 points and 10 boards but shot just 3 of 11.
"Granted we're tired. It's the last game on a road trip. But there are no excuses. It's a game we should have come in here and stole."
The Jazz opened with their big lineup again: Favors at power forward in place of Williams and Foye in at shooting guard in place of Hayward.
That changed one minute in as Favors had two fouls and went to the bench. Both would be key reserves, with Williams adding 12 points, including 3-of-3 shooting from beyond the arc.
Utah led 61-44 at halftime, shooting 50 percent to 38 for the Rockets. The Jazz also held a 26-18 edge on points in the paint and 17-6 advantage on the fast break in the first half, while their bench outscored the Rockets reserves 26-9 before the break.
"We got down and pretty much the whole rest of the game was a dog fight trying to get back into the game," said Patterson, who shot 8 of 14 and had two of Houston's nine blocked shots.
Notes: Former Jazz coach and Hall of Famer Jerry Sloan watched the game from about 20 rows above Utah's bench. ... Jefferson had nine rebounds in the first half. ... Utah shot just 40.2 percent but made 9 of 21 from 3-point range. The Jazz also held a 30-19 advantage on the fast break. ... The Rockets were 7 of 21 from 3-point range and shot just 34.9 percent overall. ... The Rockets will play five of the next six at home, including a rematch with the Jazz on Dec. 1.