Dallas came within inches of taking the lead when Ryan Hollingshead picked up the ball on the edge of the box and drilled a strike towards goal, but his shot crashed off the post and bounced clear.
Fabian Castillo tested the handling ability of Penedo with two powerful efforts from distance before the break, but the keeper was equal to both strikes to keep the score level.
Dallas almost responded immediately as Perez released the run of Castillo down the flank, and he raced past Tommy Meyer, only to fire his strike across the face of goal and behind for a goal kick.
The home side got their equaliser as Diaz lifted a ball over the static Galaxy defence for Perez to collect and knock around Penedo before slotting into an empty net.
Diaz turned provider for the Dallas winner as he released the run of Akindele with an inch-perfect crossfield pass, and the forward made no mistake in blasting his strike past Penedo to earn his team the three points.