The Poles battled throughout to contain a Sweden side bristling with youthful attacking vigour, but in the end they capitalised on the visitors' mistakes thanks to the experience of Lewandowski and his team mates.
The visitors threw caution to the wind and poured forward, with Szczesny getting down smartly to deny Emil Forsberg again, with Victor Lindelof sending the resulting corner just wide with a glancing header.
Sweden looked likeliest to score as they pushed for an equaliser, but a breakdown in the visitor's defence allowed Piotr Zielinski to break free on goal and curl a tidy shot past Robin Olson at his near post to double Poland's lead.
The Swedes brought record goalscorer Zlatan Ibrahimovic off the bench for the final 10 minutes, but the Polish defence held firm in front of the capacity crowd to book their spot in the World Cup finals.
Poland will learn their group opponents on Friday when FIFA holds the draw for the 2022 World Cup.
Information from Reuters was used in this report.