The visitors came close to breaking the deadlock when Amadou Dia raided down the right flank and got to the byline where he drilled an effort at the near post, but Chris Seitz made a good stop with his legs.
Sporting got back into the game just before the break when Roger Espinoza carved out space and time on the edge of the box to drill a low effort through the hands of Seitz and into the bottom corner.
In the second half, the home side regained their lead when Michel curled a cross to the back post, where Perez peeled off his marker and volleyed the ball past Marin from a tight angle.
Castillo put Dallas two goals ahead on a 73rd-minute counter-attack as Michel lifted a pass into Ryan Hollingshead, who slipped a through ball to the forward to round Marin and slot the ball home.
Kansas City were handed the chance to reduce the deficit when Bernardo Anor was fouled in the box and a penalty was awarded.
Dominic Dwyer took the spot kick, but saw his strike saved by Seitz, as the home team to held out for the victory.