The result left Panama in second place in Group A with three points, three behind Canada and ahead of Jamaica on goal difference. Panama faces Jamaica on Sunday when a draw would be enough to send it to the knockout round along with Canada.
The Panama victory assured Canada of a place in the semifinals and left Guatemala, making its debut in the U-17 women's finals, with zero points.
Besides the goals from 14-year-olds Riley and Cox, and 15-year-old Batista, "Las Canaleras" also got a strike from 13-year-old Yassiel Franco.
After losing all three games at the CONCACAF finals in 2010 - and scoring only one goal, and being routed by Canada 6-0 in its opener on Wednesday, Panama jumped ahead early against Guatemala.
Riley ran onto a ball chipped by Franco over the head of defender Maria Macal, let it bounce once and volleyed it from 12 meters past Guatemala keeper Mariandre Rodas in the fourth minute.
Panama had the better of play over the next 20 minutes, highlighted by Cox's drive from more than 25 meters that Rodas tipped onto the right post.
But Guatemala equalized in the 29th. Nina Arzu's free kick from the near the midfield was flicked on by Vivian Herrera, and Paula Ibarguen settled it in the area while the Panamanian defense appealed in vain for an offside call. Ibaraguen had time to get behind the ball and finish with a right-footed drive from the 12 meters.
Batista put Panama back in thelead five minutes later, stepping in to intercept defender Setphanie Rodriguez's just outside the Guatemala area and hitting a right-footed shot from the edge of the area.
Riley gave "Las Canaleras" some insurance in the 36th, receiving a short ball from Cox, taking a touch and turning without being challenged just outside the arc and driving a ball that sailed over the outstretched arm of Rodas and off the underside of the crossbar.
Franco scored her goal in the 49th, running down the left, fighting off an attempted slide tackle by Macal and finishing from 10 meters.
Cox converted a penalty in the 71st after Rodriguez tripped Franco at the top of the area; Batista added her second in the 73rd and Cox tallied off a free kick from just outside the 18 in the second minute of injury time to complete the scoring.