ANAHEIM, Calif. - Mike Trout homered leading off the ninth inning after the Los Angeles Angels twice rallied to tie the game, giving them a 7-6 victory over the Houston Astros on Friday night.

Trout sent an 0-2 pitch from Tony Sipp over the wall in left centre field and charged into a celebratory mob at home plate. Teammate Erick Aybar doused Trout with a blue sports drink, staining his white uniform, and fans chanted "MVP! MVP!"

It was Trout's second career walkoff hit, both of them homers.

Joe Smith (3-0) got the victory for the Angels, who have won eight in a row at home for the first time in nearly nine years.

Sipp (1-1) took the loss for the Astros, who dropped their fifth in a row.

Houston's Jose Altuve, who came in leading the American League in hits, stolen bases and batting average, went 0 for 5 with a strikeout.

The Angels blew a 3-1 lead in the third and then trailed 6-5 on Albert Pujols' 510th career homer — a two-run shot — in the fourth. They tied it 6-all in the seventh on Howie Kendrick's RBI double off the right field wall that scored Pujols, who singled leading off.

The Astros led 1-0 in the second on Chris Carter's homer. They took a 6-3 lead in the fourth on George Springer's two-run homer and a three-run shot by Jon Singleton.

Angels starter C.J. Wilson continued to struggle. The left-hander has failed to pitch more than five innings in four of his last seven starts. He gave up six runs and seven hits in 4 1-3 innings, struck out six and walked one.

Houston starter Dallas Keuchel allowed five runs and 13 hits in five innings, struck out one and walked one. The left-hander was scratched last Saturday against Detroit because of left wrist inflammation. He was making his first appearance since June 22, when he allowed five runs — four earned — in a 5-2 loss to Tampa Bay.

NOTES: Houston reinstated RHP Josh Fields from the 15-day DL after he went on it with soreness in his right forearm. ... The Astros traded RHP Andrew Robinson to Atlanta for a player to be named or cash considerations. ... The Angels improved to 28-29 on the Fourth of July, including 14-14 at home. ... The announced crowd of 43,557 was the Angels' fourth sellout of the season.