49ers’ optimism building under Jimmy Garoppolo

Quarterback Jimmy Garoppolo, unleashing a second-half pass, has imbued the 49ers with a newfound sense of confidence. Quarterback Jimmy Garoppolo, unleashing a second-half pass, has imbued the 49ers with a newfound sense of confidence. Photo: Tim Warner, Getty Images Photo: Tim Warner, Getty Images Image 1 of / 7 Caption Close 49ers’ optimism building under Jimmy Garoppolo 1 / 7 Back to Gallery

HOUSTON — Joe Staley has seen a lot in his 11 seasons in the NFL: bad, good, really good and really, really bad.

So his opinion carries a little more weight than that of his younger teammates, the ones who just arrived and don’t know as much about how the league works or how a losing attitude becomes ingrained.

Staley knows that since the arrival of Jimmy Garoppolo, things have changed.

“We’re playing with confidence right now,” Staley said. “Jimmy’s playing really well back there. He raises all ships.

“It’s just a different feel.”

Recommended Video:

It most certainly is. Call him High Tide Jimmy, flooding the locker room with optimism and elevating all the other 49ers with him.

The 49ers have won in consecutive weeks for the first time in more than three years. The 49ers have won three of four games, the past two wins on the road.

These are baby steps back to respectability. And though three wins — with possibly more on the horizon — is messing with the 49ers’ draft position, it’s no longer a concern.

Because they already have the missing piece, the one thing every NFL team needs: a quarterback who can lead them to wins.

“Jimmy’s a great guy. He’s a leader,” receiver Marquise Goodwin said. “He’s a natural at it. It gives you extreme confidence. When you look at him in the second quarter, and you’re down by one or up by one, you feel that sense of hope: ‘I’m going to get the job done.’ At no point in the game do I ever feel like we’re behind, or we’re slacking at that position.”

This is obviously a difficult thing to do, to walk into a winless locker room midway through the season and instantly become a leader. It speaks to how hungry the 49ers have been for a competent quarterback, for leadership on offense. It also speaks to who Garoppolo is.

Coming from the Patriots, knowing only success at the professional level and being in the same quarterbacks’ room as the best at the position, gives Garoppolo instant credibility. But it’s more than that.

“Sure, he learned a lot coming from there, but it’s more about the person,” Staley said. “You are who you are as a person. You can’t fake that. And he’s wired that way. He’s a very detail-oriented, focused, competitive, fiery guy. We feed off him.

“He’s doing a great job.”

With Garoppolo guiding the offense, the young 49ers are learning how to win. He was rocky in the first quarter, misfiring on a few passes and throwing an interception over the middle.

But in the second quarter, things settled down. Garoppolo took the team on three scoring drives, two field goals and a touchdown that was set up by Kyle Juszczyk’s 31-yard reception down the sideline.

“Jimmy is already a leader in this offense,” Juszczyk said. “He’s definitely elevated people’s play. He’s given people chances to make plays. Adding Jimmy to this offense has been a difference-maker.”

The Texans scored at the start of the second half to take a 16-13 lead. The 49ers didn’t fold. And they didn’t get tight, like they might have in the past.

“Guys aren’t pressing,” Staley said. “You keep with it, moving the ball. That comes from the quarterback.

“We’re not playing individual series, we’re playing the whole game.”

The 49ers came back to tie the game on a field goal and then took the lead on Garoppolo’s first touchdown pass as a starter, to tight end Garrett Celek, whose 61-yard reception set up the touchdown.

“We’ve been playing a lot better,” Celek said. “I think our vibe has changed. You can just see it.”

You don’t need to tell that to 49ers fans. You can feel it in the locker room. You can see it in the stands: There was a loud contingent of 49ers fans who made themselves known at NRG Stadium. Someone pointed out that they had seen 49ers fans in No. 10 Garoppolo jerseys in Houston.

“I think that was my family,” Garoppolo said, adding, “49er Nation was loud out there. It’s impressive how well they travel.”

You can see the improvement in the statistics: Garoppolo was 20-for-33 for 334 yards. He was under pressure, two sacks and nine quarterback hits. But he made plays and used all his options, finding eight different receivers.

For the first time in ages, the 49ers have momentum. Optimism.

“It’s building confidence,” Juszczyk said. “It’s tough to grind as hard as we do and not see results. Now we’re getting some of those rewards.”

And the man who has been in uniform the longest can see the difference.

“It is,” Staley said, “all very exciting.”

Ann Killion is a San Francisco Chronicle columnist. Email: akillion@sfchronicle.com Twitter: @annkillion