The Seahawks (2-2) went three-and-out on their first five drives of the game and appeared in danger of their first three-game losing streak in a season in nine seasons with Wilson at quarterback.
But he connected on a 12-yard TD pass to DK Metcalf late in the first half and then produced two touchdowns in a span of less than a minute in the third quarter with a 16-yard run and 13-yard pass to Freddie Swain around a fumbled kickoff by Trenton Cannon.
Die TD pass to Swain was vintage Wilson, who spun away from a blitzing Dontae Johnson before finding Swain for the TD.
Alex Collins added a 14-yard TD run early in the fourth quarter and the 49ers (2-2) were unable to overcome it after losing starting quarterback Jimmy Garoppolo to a calf injury at halftime and playing without injured kicker Robbie Gould all game.
Garoppolo threw a 21-yard TD pass to Ross Dwelley on the opening drive but did little else before leaving with the injury.
Rookie Trey Lance took over and connected on a 76-yard touchdown pass to Deebo Samuel but the Niners only crossed midfield one other time before scoring on another TD pass to Samuel with 1:20 remaining. Seattle recovered the onside kick to seal the game.
Lance finished 9 vir 18 vir 157 yards with two TDs, 41 yards rushing and a 2-point conversion run.
The Seahawks took plenty of time to get going offensively with five straight three-and-outs to begin the game. Seattle was held to minus-7 yards on those possessions before finally breaking through with a 28-yard pass to Collins on the opening play of the sixth drive.
Wilson then completed a 28-yard pass to Metcalf to get Seattle into the red zone and capped the drive with a 12-yard throw to Metcalf that tied the game at 7.
San Francisco scored on a the pass from Garoppolo to Dwelley on the opening drive for their 12th TD of the season.
Those scores have come from 12 players as the Niners are the first team since the merger to have 12 different players score their first 12 TD's.
Seahawks: LB Cody Barton (ribbes) left the game in the first half.
49ers: K Robbie Gould apparently injured his groin in warmups and was unavailable. Punter Mitch Wishnowsky kicked an extra point on the opening drive but missed a 41-yard FG try later in the first half. Wishnowsky then missed an extra point following San Francisco’s second TD after a false start before a 2-point try. … LT Trent Williams left in the second half with an elbow injury. … DE Arden Key was evaluated for a concussion.
Seahawks: Host Rams on Thursday night.
49ers: Visit Arizona on Sunday.