Locker threw for 326 yards with two touchdowns and an interception in a 31-17 loss to the Niners.
Locker sprained his right hip and right knee in a Sept. 29 win over the Jets in Nashville.
The Titans (3-4) have now dropped three straight after losing the previous two games with Ryan Fitzpatrick as their starting quarterback.
Tennessee has a bye next week before a Nov. 3 game at St. Louis, and coach Mike Munchak had said the possibility of an extra two weeks off would play into the starting QB decision.
But Locker took increasing practice work each day this week, and the team felt he was ready to return.
Locker was outstanding prior to suffering the injury three weeks ago, completing 62.2 percent of his passes for 721 yards and six touchdowns with zero interceptions over his first four games.