After adding a run in the eighth, the Astros left the game in the hands of closer Brett Myers, who had converted 17 of his previous 18 save opportunities.
Myers was unable to give Houston a win in the series, giving up six runs in two-thirds of an inning to absorb his third loss of the year. It was the second blown save of the season for Myers, and his first at home.
John Baker led off the inning with a double and scored the first Padres run. Mark Kotsay singled one out later.
The biggest blow came from Alex Amarista with a two-out grand slam that broke a 3-3 tie and allowed the Padres to gain a series split.
The Astros had escaped a troublesome ninth inning in Wednesday's 1-0 win. With Myers unavailable, Lucas Harrell worked out of a bases-loaded jam to gain his first career complete game.
Myers couldn't evade his troubles and ended up with a brutal setback.
"I sucked," Myers said. "I gave up runs. That's not my job. I'm supposed to shut down the inning and I didn't do it."
Astros manager Brad Mills is now facing the challenge to regroup as the team heads for the season's toughest turnaround, a 1:20 CT game on Friday at Wrigley Field in Chicago.
While Myers was not sharp in the ninth, the Padres got help when a one-out ground ball hit by Logan Forsythe got past Astros third baseman Chris Johnson. Pinch-runner Cameron Maybin scored on the play to make it 3-2.
Chase Headley had his third hit of the game and Carlos Quentin was hit by an 0-2 pitch with the bases loaded to make it 3-3 and set the stage for Amarista's home run.
"It's tough to give a Major League club more than three outs in an inning," Mills said. "That's kind of what happened. They had some good at-bats and were able to come through."
Among the 19,415 spectators was a sizable portion who came to see Cashner, who grew up 40 miles north of Houston and played for Conroe High School.
Cashner gave his supporters everything they could want and more before falling short in the seventh. Through it all, he concentrated on his pitches without thinking about a possible no-hit gem.
"I never really try to think about that stuff," Cashner said. "I just try to make pitches. After I gave up the hit to Lee I was really just trying to lock in and get a double play right there. I wasn't able to do that."
If the Astros could have held on for the win, Bogusevic would have been a major reason. He got behind in the count early and fought off several pitches before getting one to hit.
"Cashner was throwing hard and locating it, then he throws his changeup for strikes," Bogusevic said. "That made him tough. Eventually I got something that was a good pitch to handle."
Despite the tough setback, the Astros have to put it behind them and get on the late night plane for Chicago. Taking time to reconsider Thursday's game is not an option.
"We better shake it off fast, because we play in about 13-14 hours," Bogusevic said. "Sometimes, you get beat at the end. You have to move on. We've got a game coming up real quick."