Tarvaris Jackson completed 16 of 25 passes for 163 yards and one touchdown for the Vikings (7-6), who have won four in a row.
Chester Taylor rushed for 101 yards and a touchdown on eight carries and Robert Ferguson caught four passes for 57 yards and one score for Minnesota.
Trent Dilfer was just 7-of-19 passing for 45 yards and one interception before being replaced by Shaun Hill because of an injury in the second quarter. Hill completed 22 of 28 passes for 177 yards, one touchdown and one interception.
Frank Gore carried the ball 16 times for 68 yards and caught eight passes for 49 yards for the 49ers (3-10).