SAN FRANCISCO -- Sunday's 27-13 victory put the 49ers back on track in their playoff push. Next up is a potential Super Bowl XLVII opponent: the New England Patriots.

Going into Foxboro, Mass., should prove a tougher task than Sunday's triumphant effort against the pesky Miami Dolphins at Candlestick Park.

"We're going to be able to see where we are as a defense," 49ers safety Donte Whitner said of facing the AFC East champion Patriots. "We understand who's going to have to win that football game, and we think it's going to be the defense."

Unlike last week's 16-13 overtime loss at St. Louis, the 49ers (9-3-1) not only protected their fourth-quarter lead but also made it larger behind Colin Kaepernick's 50-yard touchdown run with 2:10 remaining.

Bouncing back was nothing new under coach Jim Harbaugh. Victories have followed the 49ers' three defeats (and lone tie) this season, as well as their three losses during the 2011 regular season.

"We want to stay hot in December and try to make this run," said running back Frank Gore, who had a 1-yard touchdown run and eclipsed the 1,000-yard mark for the sixth time in eight seasons.

Aside from retaining the NFC's second-best record, the 49ers gained ground on the NFC-leading Atlanta Falcons, who fell to 11-2 by losing at Carolina 30-20. However, the Seattle Seahawks (8-5) kept close pace in the NFC West, which the 49ers had won by this time last season.

The 49ers will play at Seattle on Dec. 23, a week after visiting potential league MVP Tom Brady & Co.

"A legend, a Hall of Fame guy," linebacker Patrick Willis said of Brady. "His offense is very potent. At the same time, I love our defense and what we have here."

Highlighting the 49ers' defensive exploits Sunday was, once again, Aldon Smith. His two sacks gave him 191/2 this season, setting a team record and pulling him within three of Michael Strahan's 2001 league record. Smith's final sack of rookie Ryan Tannehill came on the Dolphins' final series.

Two snaps earlier, Kaepernick faked a handoff to Gore and raced untouched down the left sideline for his 50-yard touchdown run. Kaepernick also had a 50-yard run last week -- the longest ever by a 49ers quarterback -- but that followed a botched pitch play to Ted Ginn Jr. that led to the Rams' tying touchdown.

Kaepernick, making his fourth consecutive start, was 18 of 23 for 185 yards against Miami to earn praise from Harbaugh. On the flip side, Kaepernick was sacked a career-high four times, fumbled once (recovered by right tackle Anthony Davis) and lamented the 49ers' 2-of-10 conversion rate on third downs.

"We just had a few bad third downs, but we knew we had a good game plan and just had to execute," Kaepernick said.

It wasn't lost on Harbaugh that Kaepernick's 50-yard scoring run came on a third-and-5 play. "Great call by Greg Roman and a big third-down conversion," Harbaugh said. "We'd been struggling on third down. To get that to pop and score a touchdown was great."

Unlike their previous bounce-back wins under Harbaugh, the 49ers allowed a touchdown in this effort. Anthony Fasano made a fourth-down, one-handed touchdown grab of a 3-yard pass, cutting the 49ers' lead to 20-13 with 7:55 remaining.

The 49ers defense held serve on its next series. A roughing-the-passer penalty against NaVorro Bowman moved the Dolphins to the 49ers' 35, but that potential tying drive ended there after four incompletions by Tannehill.

"We didn't make the plays in the fourth quarter. They did," Dolphins coach Joe Philbin said.

Tannehill passed for only 150 yards (completing 17 of 33). Second-year cornerback Chris Culliver had a team-high three passes defensed, including a leaping deflection in the end zone.

Although rookie LaMichael James' debut provided spark (and 124 all-purpose yards), the 49ers leaned on Gore to grow their lead.

Gore's 1-yard touchdown run in the third quarter was his 50th career rushing touchdown, matching the 49ers' record shared by Roger Craig and Joe Perry. Setting up that score was the game's only turnover: C.J. Spillman recovered Marcus Thigpen's muffed punt return at the Dolphins' 9-yard line.

Gore provided two 19-yard plays on the 49ers' second touchdown drive. First, he escaped five tackles on a 19-yard screen catch to the Dolphins' 38. Gore opened the fourth quarter with a 19-yard run to the 1, and Anthony Dixon ran the ball in for a touchdown on the next snap for a 20-6 lead.

"Our offense played winning football," Harbaugh said.

The Patriots, their next opponent, have been known to do the same.

"Their offense is going to try to control the football, get big plays and put points on the board," Whitner said of New England. "We can't allow that. So we'll be ready."

For more on the 49ers, see Cam Inman's Hot Read blog at blogs.mercurynews.com/49ers. Follow him on Twitter at twitter.com/CamInman.

Sunday's game
49ers (9-3-1) at New England (9-3), 5:20 p.m. NBC

INSIDE
Brandon Jacobs inactive again after gripes on social media. Page 6

Scan: Use your smartphone to access a photo gallery from Sunday's game, or visit mercurynews.com/49ers

TOUCHDOWN TOTE MEN
Frank Gore's rushing touchdown Sunday gave him a tie for the all-time 49ers lead in that category. Here are the franchise leaders in rushing TDs:
RANK RUSHER TDS
1. Frank Gore 50
Roger Craig 50
Joe Perry 50*
4. Ken Willard 45
5. J.D. Smith 37
Steve Young 37
* Does not include 18 rushing touchdowns scored by Perry during two seasons with 49ers in the All-America Conference before franchise joined NFL in 1950.