The Astros owned a 3-1 lead heading into the ninth and Brett Myers came on in a bid to record his 18th save.
Instead, the Padres batted around and benefited from a costly error that made five of the runs in the inning unearned.
San Diego had runners on first and third with one away when Logan Forsythe hit a grounder to third baseman Chris Johnson, who misplayed the ball for an error, opening the floodgates for the Padres.
Myers (0-3) had a chance to escape the inning when he fanned Jesus Guzman with the bases loaded for the second out of the frame. Amarista, however, followed with a homer to right that snapped a 3-3 tie.
It was the first homer of Amarista's career.
San Diego starter Andrew Cashner did not give up a hit through six innings, but eventually allowed two runs on two hits.
The win went to Nick Vincent (1-0) even though he allowed a run in the eighth.
Exploding whale video goes viral on Internet
Couple calls 9-1-1 over missing hash browns; assault McDonanld's employees