FOXBOROUGH, Mass. — Tom Brady idolized Joe Montana as a kid in the Bay Area. Now he has surpassed his hero in postseason wins.

Brady got his 17th, the most for any starting quarterback, in New England’s 41-28 AFC divisional victory over Houston on Sunday. If Brady can lead the Patriots past Baltimore in next weekend’s conference title game, then win the Super Bowl, he’ll equal the 49ers’ Hall of Famer for NFL championships.

Brady has guided the Patriots to five Super Bowls, winning the first three. Montana was 4 for 4 in the big game playing for Brady’s hometown team.

“I grew up a 49ers fan,” said Brady, who threw for three touchdowns and 344 yards. “Joe Montana and Steve Young ... those guys are in another class.”

Next up are the Ravens, who stunned top-seeded Denver in double overtime Saturday and lost 23-20 at Gillette Stadium last January in the last step before the Super Bowl. The Ravens beat the Patriots in Week 3 at Baltimore.

“I think the two best teams are in the final,” Brady said. “Baltimore certainly deserves to be here, and so do we.”

Seldom-used Shane Vereen scored three times, twice on pinpoint throws from Brady, as New England beat Houston for the second time in a month.

Brady was missing some key helpers but got the usual outstanding performance from Wes Welker, his favorite target the past six years. The AFC’s top receiver with 118 catches this season, Welker looked like he might reach that total against Houston’s befuddled defense. He caught six in the first half for 120 yards, including a 47-yarder, and wound up with eight for 131.

And the AFC East champions got more than anyone could have predicted from third-stringer Vereen, who scored their first two TDs on a 1-yard run and an 8-yard pass. He capped his biggest pro performance with an over-the-shoulder 33-yard catch early in the fourth. It was Brady’s 41st postseason TD pass, trailing only Brett Favre (44) and Montana (45).

“I don’t come into the game knowing how much anyone is going to play,” Vereen said. “I come into the game ready to go, and if my number is called, I do my best for the team.”

The boost from Vereen offset the losses of tight end Rob Gronkowski (arm) and running back Danny Woodhead (thumb) in the first quarter.

A person with knowledge of the injury said Gronkowski broke his left forearm and needs surgery that will end his postseason. Gronkowski had broken his left forearm while blocking for an extra point near the end of New England’s 59-24 victory over the Indianapolis Colts on Nov. 18 and underwent surgery. He missed five games and returned for the regular-season finale.

New England’s defense helped put away the Texans. Rob Ninkovich’s third-quarter interception stopped a drive and, six plays later, Brady hit Brandon Lloyd for a 6-yard TD.

Although the Texans got two fourth-quarter TDs on passes by Matt Schaub, their season ended with four defeats in their last six games. That slump cost the AFC South champions the top seed in the playoffs, forcing a trip to New England after they beat Cincinnati in the wild-card round.

“I think every team in the NFL knows how good that opponent is,” coach Gary Kubiak said. “If you’re going to achieve something, you’re going to have to go through them at some point. This organization will keep battling to do that.”

But unlike their 42-14 loss here a month ago, they didn’t fold early. J.J. Watt, the dominant defensive end, bothered Brady throughout, and when they fell behind 17-3, they had the fortitude to climb back.

Arian Foster did all the work after Danieal Manning’s second big kickoff return, this one a 35-yarder that had 15 yards tacked on when kicker Stephen Gostkowski brought down Manning with a horse-collar tackle. The Pro Bowl runner covered all 47 yards on a five-play drive, and his 1-yard run — he barely squeezed into the end zone — made it 17-10.

Houston forced a three-and-out, and a short punt gave the Texans another shot just before halftime. They got close enough for Shayne Graham to kick a 55-yard field goal as the half ended.

But the Patriots pulled away in the third quarter for coach Bill Belichick’s 17th postseason win, third behind Tom Landry (20) and Don Shula (19).