SANTA CLARA, Calif. -- As his ecstatic teammates rushed Robbie Gould to celebrate the kicker's game-winning field goal, Jimmy Garoppolo slowly walked the other way despite his own spectacular first home start and pulling off a wild December win against a playoff contender.
He shared a quick hug near the sideline with Marquise Goodwin, who had quite a day of his own after losing his father last week.
Garoppolo led one final scoring drive in the closing seconds to cap a fantastic first full game at Levi's Stadium, Gould kicked a 45-yard field goal as time expired, and the San Francisco 49ers topped the Tennessee Titans 25-23 on Sunday.
"We're a young team, we're learning how to win," Garoppolo said. "I think these close games will pay off in the long run, I think for next year and everything."
Garoppolo threw for a career-high 381 yards and a touchdown during a dominant day to give the 49ers (4-10) a three-game winning streak in a lost season - and three straight comeback victories. And Tom Brady's former understudy showed he could do it at home as well as on the road - and against a playoff contender, no less - outdueling Marcus Mariota down the stretch as the teams traded field goals.
Gould kicked three of his six field goals over the final nine minutes: 50, 48 and 45 yards and has now gone 20 consecutive without a miss.
He put the Niners out front on a 48-yarder with 3:08 remaining. Mariota then drove the Titans (8-6) to a lead as Ryan Succop kicked a 50-yard field goal with 1:07 to play.
Then, Garoppolo and the San Francisco offense got one last shot.
It took three tries this season, and first-year coach Kyle Shanahan finally found his reliable, playmaking quarterback after acquiring Garoppolo from New England at the October trade deadline.
"He's been just as good as advertised, if not better," Shanahan said.
Garoppolo showed that in 67 seconds - the same amount of time he had left Sunday - when forced into late action in a loss to Seattle three weeks ago at Levi's Stadium, then in back-to-back road games before shining again.
"I think the 49ers got a quarterback," Titans safety Kevin Byard said.
Goodwin, who already dealt with the death of his premature son last month, made 10 catches for 114 yards and Garoppolo completed 31 of 43 passes to go over 300 yards passing for the second straight game after last week's win at Houston.
Mariota put Tennessee ahead on an 8-yard touchdown pass to Rishard Matthews early in the fourth as the Titans rallied back from an early 13-point deficit.
The 49ers were in good position the ensuing possession before Garoppolo was sacked by Wesley Woodyard for a 10-yard loss. Then, Gould converted a 50-yarder.
Tennessee came out of intermission a new team, totaling 22 offensive plays to San Francisco's five in the third quarter.
Garoppolo became the first 49ers quarterback since the merger in 1970 to win each of his first three starts and just the second QB to do so in franchise history. Y.A. Tittle did so spanning the 1951-52 seasons.
He threw a 5-yard touchdown pass in the second quarter to tight end Garrett Celek - whose great play in recent weeks has earned the nickname of "Celek Time." Celek later had a 41-yard catch.
"Yeah, Celek Time. That guy, he always finds a way," Garoppolo said.
Garoppolo didn't even have Trent Brown to block for him after the right tackle went on injured reserve with a right shoulder injury that will require surgery. Mariota threw a 4-yard TD pass to former 49er Delanie Walker late in the first half to keep the Titans close.
Garoppolo was 5 of 6 passing on his opening possession as San Francisco mixed its play calls well to catch the stingy Titans defense off guard. Gould's 38-yarder capped the 12-play, 64-yard initial drive. Gould hit a 48-yarder late in the first and then kicked one from 28 yards just before halftime.
The Titans dropped back-to-back road games against the NFC West after losing last week to the Cardinals and staying in Arizona for the week of practice. It could affect their playoff chances.
Their first visit to Levi's Stadium - Tennessee last played the Niners on the road at Candlestick in November 2009 - began slowly, the team's second straight week playing a stadium for the initial time.
Mariota, in the midst of one of the worst stretches of his three-year career, threw for 241 yards while completing 23 of 33 passes.
Tennessee's typically tough defense was a far cry from that dominant unit in the first half.
Garoppolo threw for 189 yards and the Niners outgained the Titans 219-136 in the first half. The 49ers didn't punt until more than midway through the third quarter.
Last week, the Titans allowed only four field goals, the second time this season they'd done so.
Titans: CB Logan Ryan sustained an ankle injury in the second quarter.
49ers: WR Aldrick Robinson suffered a concussion in the first quarter. He went to the locker room with head and wrist injuries after he was hit hard by Titans cornerback Adoree' Jackson along the Tennessee sideline. Robinson was stretching out trying to make a catch when he got slammed and went down for several minutes with 5:24 to go in the opening quarter.
Titans: Host Rams next Sunday and home the final two weeks.
49ers: Host Jaguars next Sunday.