Milan Skriniar’s fine low shot on the turn from the edge of the penalty area secured the three points for Slovakia, a country ranked 36th in the world.
They had taken an early lead when the ball bounced off the post and rebounded in off Poland goalkeeper Wojciech Szczesny after a fine run and shot from Robert Mak.
A lovely one-touch move, calmly finished by Karol Linetty, brought the Poles level early in the second half.
But the 62nd-minute dismissal of Poland midfielder Grzegorz Krychowiak for a second booking changed the momentum of the match and Skriniar and Slovakia took full advantage seven minutes later.
The other two nations in Group E, Spain and Sweden, face each other in Seville in the late game on Monday (20:00 BST).
A crisis, pessimism and Marek Hamsik – Slovakia scouting report
Poland reached the quarter-finals of Euro 2016, losing to eventual winners Portugal on penalties, and now need to beat either Spain or Sweden to have a chance of progressing.
Slovakia’s Ondrej Duda fired wide early on, but his country went ahead thanks to fine work from Ferencvaros forward Mak, who helped Manchester City win the FA Youth Cup in 2008 but never played a senior game for them.
There appeared to be no danger when Mak collected the ball near the left wing, but a fine turn took him past Kamil Jozwiak and a nutmeg on Bartosz Bereszynski got him into the area, where his low strike hit the foot of the post but rebounded in off the unfortunate Szczesny.
It continued a bizarre run of bad luck for the ex-Arsenal goalkeeper in European Championship openers, after he was sent off in Poland’s first game of Euro 2012 and went off injured at the beginning of Euro 2016.
Poland failed to have a shot on target in the opening 45 minutes, but were level within a minute of the restart.
A brilliant passing move down the left involving Leeds midfielder Mateusz Klich and Maciej Rubus saw the latter pull it back for Linetty and he side-footed the ball into the net.
Poland looked to build on that equaliser, but Krychowiak’s dismissal left them on the back foot.
Robert Lewandowski had scored 48 goals for Bayern Munich in the 2020-21 season, but was kept quiet by a superb display from the Slovakia defence.
Therefore, it was fitting the superb Skriniar, in a game where he also made 10 clearances, three interceptions and two blocks, would become Slovakia’s hero when he took down a poor Poland clearance and drilled in the winner.
Slovakia reached the last 16 of Euro 2016 and this victory leaves them well placed to reach the knockout stage again.
Slovakia stay in St Petersburg and face Sweden on Friday, 18 June (14:00 BST), before Poland play against Spain in Seville on Saturday (20:00).