Smith scrambled and started to slide before turning his back late, and linebacker Jo-Lonn Dunbar barreled into his neck area with 1:10 left in the first quarter.
But the No. 1 overall pick in the 2005 draft stayed in and completed his next five passes, including Michael Crabtree's TD.
After the hit, Smith was sacked three plays later and also clobbered again on a fourth-and-1 keeper. Doctors indicated to Harbaugh that might have been the play that caused injury.
Coach Jim Harbaugh said Smith would be evaluated this week per NFL concussion protocol. He wasn't available to speak to reporters. Smith, who has started 28 straight games, wound up 7 for 8 for 72 yards.
Colin Kaepernick replaced Smith. He completed 11-of-17 passes for 117 yards and also had eight carries for 66 yards and a touchdown.
Information from The Associated Press was used in this report.