Another penalty on Brown, for holding, gave the Colts a first down at the 23 midway through the second quarter and set up Vinatieri's 43-yard field goal. He kicked a 41-yarder in the third quarter.
Brown was penalized yet again for pass interference midway through the fourth.
Luck kept drives going with clutch plays as the Colts won the third straight meeting with San Francisco.
On third-and-9 and throwing from near his end zone late in the third, Luck hit Reggie Wayne for a 25-yard gain in which Wayne broke through several tackle attempts.
All-Pro linebacker Patrick Willis went down on the play and was helped off the field moments later with a groin injury that sidelined him for the rest of the game.
The Colts busted through San Francisco's defensive line, which lost nose tackle Ian Williams to a season-ending ankle injury last week.
"It's one of those games you look back on down the road and say, 'This was a signature win, maybe one that helped you to do great things, that helped you accomplish the program you built," Pagano said.