"You get over the age of 30, they kind of count you out," Johnson said. "But we proved to people that we could still play."
Released by Houston in March after 12 seasons with the team, Johnson had six catches for 77 yards.
The Colts (3-2) extended their AFC South winning streak to an NFL-record 16 games.
Hasselbeck was filling in for Andrew Luck, who missed his second straight game with a shoulder injury.
Hasselbeck's performance was even more impressive given the fact that he was battling a bacterial infection that hospitalized him this week. He started feeling ill just before halftime Sunday in a victory over Jacksonville and didn't start feeling better until Thursday night.
"I honestly feel like this isn't even real right now," Hasselbeck said.
Coach Chuck Pagano raved about Hasselbeck.
"He was literally on his deathbed Monday/Tuesday and mustered up enough to come in Wednesday and practice," Pagano said. "He was getting IVs and fighting a virus and the grittiest performance I've seen in a long, long time."
Johnson extended the lead to 27-17 with the 2-yard reception with about 10½ minutes left. The Texans intercepted Hasselbeck's pass in the end zone earlier in that drive, but the play was negated because of defensive holding on Eddie Pleasant. A second penalty, this one for pass interference, gave the Colts a first down at the 1.
Mallett got the wind knocked out of him on an illegal hit midway through the second quarter and was replaced by Hoyer. Mallett looked to be OK soon after that, but coach Bill O'Brien stuck with Hoyer. He finished with 312 yards passing with two touchdowns. Both of the touchdowns were to rookie Jaelen Strong, and they came on Strong's first two NFL receptions.
DeAndre Hopkins had 11 receptions for 169 yards for Houston.
"We're not happy, obviously," J.J. Watt said. "But we're going to go back to work and figure it out."
The Colts opened the second half with a drive capped by Frank Gore's 3-yard touchdown, which made it 20-10. Gore finished with 98 yards rushing.
Strong's second catch and touchdown came on an 11-yard pass by Hoyer to get Houston to 20-17 in the third quarter.
Hoyer's desperation throw on the last play of the first half, which Strong pulled down in a sea of Indianapolis defenders for a 42-yard touchdown strike, cut the lead to 13-10. Strong boxed out two defenders and outjumped the others to reel in his first NFL catch.
Johnson entered the game without a catch in the past two games after having just one such game in his entire career in Houston. The Colts made sure that wouldn't happen again Thursday night, going to him early. He drew boos from the home crowd when he grabbed a 23-yard reception late in the first quarter. Two plays later, he scored his first touchdown of the season when he was wide-open in the back of the end zone for a 4-yard reception, which gave Indianapolis a 10-0 lead.
"When I would be on the sidelines a lot of the fans were screaming, 'Andre, we still love you! Come back to Houston! Welcome home!'" Johnson said. "So that was probably the most special thing."
Mallett was shaken up when Sio Moore crashed his helmet into Mallett's chest with about seven minutes left in the second quarter; Moore received a penalty for roughing the passer. Mallett appeared to struggle to catch his breath and was replaced by Hoyer. He was tended to by trainers for a couple of minutes after leaving the game, but soon put his helmet back on and stood near O'Brien.
Hoyer finally got Houston's offense going, and the Texans cut it to 13-3 on Nick Novak's 36-yard field goal.
Mallett looked good early, helping the Texans into the red zone. But then Foster deflected a pass and Adams intercepted it. The Colts took a 3-0 lead with a 48-yard field goal on the ensuing drive.
Mallett was 7-of-10 for 50 yards. ... It was the third straight 100-yard game for Hopkins. ... T.Y. Hilton led the Colts with 88 yards receiving.
Will the Chiefs see a new and improved Lamar Jackson?
Louis Riddick breaks down what we can expect from Lamar Jackson when the Ravens take on the Chiefs on Monday Night Football.
Who comes out on top in Dolphins-Jaguars?
Dan Orlovsky picks his winner for the "Thursday Night Football" matchup between Ryan Fitzpatrick's Dolphins and Gardner Minshew's Jaguars.
Fantasy football: DFS best buys for Week 3
Don't set your Week 3 daily fantasy football lineups without an assist from our expert, who offers up the best values at each position.
The real Gardner Minshew? An 'accountant' and 'ultimate competitor' for Jaguars
The public sees the funny, quirky and affable public side of the Jaguars quarterback. Minshew's teammates see a QB who is all business when necessary.
2020 NFL analytics survey: Which teams are most, least analytically inclined?
Which NFL team buys in to analytics the most? Which teams remain skeptical? We surveyed 26 team staffers from around the league for the inside word.
Barnwell ranks the 0-2 NFL teams in 2020: Are the Texans, Eagles and Vikings really this bad?
Houston has had a tough schedule, but Philadelphia and Minnesota just don't look right. Which winless teams still have a shot?