The Vikings (3-0) marched 87 yards in 1:27 to set up the winning score.
Lewis grabbed the pass in the back of the end zone, just keeping his feet in bounds. An official review was needed to uphold the TD.
Favre completed 24-of-46 passes for 301 yards and two touchdowns.
Percy Harvin ran a kickoff back 101 yards for a touchdown and Ryan Longell booted field goals of 40 and 52 yards for the Vikings.
San Francisco quarterback Shaun Hill was 15-of-25 for 195 yards and two touchdown passes to Vernon Davis, one on a 5-yard play and the other for 20 yards.
Nate Clements returned a blocked field goal 59 yards for another 49ers touchdown.
'How to Train Your Dragon 2' releases 5-minute clip
Moore to attend retreat in to avoid Kutcher's wedding