Krzysztof Piatek nodded the home side in front but, despite Cristiano Ronaldo's absence, Portugal rallied, and, having equalised through Andre Silva, were ahead by the interval thanks to Kamil Glik's own goal.
Bernardo Silva benefitted from poor Lukasz Fabianski goalkeeping to put Portugal further ahead six minutes into the second half, ensuring that Jakub Blaszczykowski's fine strike was a mere consolation.
Lewandowski could have capped his milestone appearance with a goal after he was put through in the 10th minute, but a tight offside call came to Portugal's rescue.
Poland soon had the lead, though, Piatek rising highest at the back post to head home Rafal Kurzawa's right-wing cross.
The offside flag denied Rafa Silva an immediate equaliser, but Portugal's pressure told just after the half-hour, Andre Silva tucking in from Pizzi's cut-back.
Portugal had its tail up and scored again in the 42nd minute as Glik's desperate tackle on Rafa Silva sent the ball into the net after the Benfica midfielder – teed up by a wonderful Ruben Neves pass – had rounded Fabianski.
Piotr Zielinski had Rui Patricio scrambling following the restart, though Fabianski's failure to deal with Bernardo Silva's low strike at the other end soon compounded Poland's misery.
Substitute Blaszczykowski set up a grandstand finish with an exquisite 77th-minute half-volley, although Poland's comeback hopes would have been ended had Tomasz Kedziora not cleared Renato Sanches' effort off the line.
That miss did not ultimately not prove costly, though, as Portugal held firm to condemn Poland to their first defeat under Jerzy Brzeczek.