Houston has won four times in seven games on the heels of a six-game losing streak.
Lyles (2-1) allowed a run on six hits in six innings before Travis Blackley, Hector Ambriz and Jose Veras completed one of the best Houston pitching performances of the year. Veras picked up his eighth save.
The Astros have just one shutout to their credit and this was the fourth time in 2013 they have limited an opponent to a single run.
J.D. Martinez gave Houston the lead with a two-run homer in the first and Jason Castro doubled home the other Astros tally in the eighth.
The Kansas City run came in the third when a double by George Kottaras brought in Jeff Francoeur.
James Shields (2-5) struck out seven over seven innings, but allowed two runs on seven hits to take the loss.