Gareth Bale struck the bar in stoppage time in a performance that will gives Wales boss Rob Page plenty of encouragement just two months from their first appearance at a World Cup since 1958.
Page was again forced to name an experimental line-up due to injuries to Aaron Ramsey, Ben Davies and Joe Allen.
But Bale was recalled from the start after beginning Thursday's 2-1 loss in Belgium on the bench as his fitness is managed in the lead-up to Qatar.
For once, Bale could not provide the spark for the hosts as they fell to just a second defeat in 22 games at the Cardiff City Stadium.
Wales started the night three points behind the Poles, knowing victory would be enough to avoid relegation.
Page's men had the better chances before the break as Dan James fired too close to Wojciech Szczesny when one-on-one before Brennan Johnson's goalbound effort was deflected behind by his own teammate James.
At the other end, Wales had done well to deny Robert Lewandowski any clear sights of goal but one moment of magic from the Barcelona striker swung the game.
Lewandowski cushioned a bouncing ball into the path of Swiderski who slotted under the onrushing Wayne Hennessey.
Wales laid siege to the Polish goal in the final half hour and were desperately unfortunate not to at least salvage a point.
Szczesny produced brilliant saves to turn Johnson's shot behind and prevent James' intended cross from finding the far corner.
Bale lasted the full 96 minutes in some consolation for Page and the LAFC forward was inches away from riding to Wales' rescue once more in stoppage time as his header crashed back off the bar.
Despite the win, Poland finished Group A4 in third place, behind Belgium and group winners the Netherlands, who progress to the semifinals.