Poland beat Wales 1-0 in Portugal
Guerreiro, a halftime substitute, chipped Wales keeper Boaz Myhill with 10 minutes remaining to cap a lively display.
Wales, who face Finland at home next month in a match they need to win to keep their World Cup hopes alive, almost took the lead in the first half when Joe Ledley hit the crossbar.
Both sides took time to settle after a raft of substitutions at halftime but it was the introduction of Guerreiro that had the greatest impact. He threatened with a couple of free kicks before settling it late on.