Brady finished 25 of 35 for 378 yards as New England won its fifth straight regular-season meeting with Houston and seventh of eight overall.
Cooks caught five passes for 131 yards and pair of scores. It was the fifth multi-touchdown game and eighth 100-yard game of his career.
Texans rookie Deshaun Watson was strong in his second career start. The Patriots were thin on the edge without linebacker Dont'a Hightower for the second straight week, and Watson took advantage, completing 22 of 33 passes for 301 yards and two touchdowns.
But he did have two interceptions, including one that set up a New England first-half touchdown.
The Patriots extended their halftime lead to 28-20 in the third quarter before Houston used a 12-yard TD pass from Watson to Ryan Griffin, and a 31-yard Ka'imi Fairbairn field goal to edge back in front 30-28 early in the fourth quarter.
The Texans forced New England to punt with just over seven minutes to play, but had to settle for a 36-yard Fairbairn field goal with 2:24 left. Houston failed on a third-and-1 at the Patriots 18.
That left Brady room. After an early holding penalty pushed New England back to its 15, Brady used a 15-yard pass to Rob Gronkowski and 27-yarder to Danny Amendola to the Houston 25. But the Texans had a chance to end the game prior to the Amendola reception when safety Corey Moore dropped an interception on Brady's second-and-18 pass attempt to Cooks.
Instead Cooks made good on his second chance for the go-ahead score. He also caught the ensuing 2-point conversion.
Houston wasn't intimidated by the Patriots in the first half, trading leads with the defending champions thanks to big plays on both sides of the ball.
With Houston trailing 7-3 after an early Brady touchdown pass to Gronkowski, the Texans' defense handed Watson great field position on the Patriots 44. The rookie responded with a 29-yard touchdown pass to Bruce Ellington.
Watson got caught trying to do too much a few drives later and paid for it when Stephon Gilmore intercepted his pass intended for DeAndre Hopkins and returned it 39 yards to the Houston 12. Brady took the lead back two plays later when he hit a wide-open Chris Hogan across the middle for a 7-yard score.
It was 14-13 when Whitney Mercilus got free around the end and sacked Brady from the blind side. The ball popped free on the hit and it was picked up and returned 22 yards by Jadeveon Clowney for a touchdown.
But the Patriots responded again late in the half when Brady found Hogan wide open again for a 47-yard touchdown.
CLOWNEY'S BIG DAY
Clowney had two sacks along with his fumble return. He became the third player in Texans history with two sacks and a fumble return for a touchdown in a game, joining Mario Williams and J.J. Watt.
The two sacks also matched a career high for Clowney.
About 30 Patriots players knelt or locked arms during the national anthem in response to criticism President Donald Trump levied against Colin Kaepernick and other NFL players and teams over the weekend. Patriots owner Robert Kraft, who's been a strong supporter of the president, expressed "deep disappointment" with Trump in a statement. Texans owner Robert McNair also called the president's comments "divisive."
Report a typo to the ABC13 staff