Both teams needed to win the match at Silesian Stadium and receive some assistance from Bosnia-Herzegovina against Italy in the other Group A1 game, but the Azzurri's 2-0 victory ensured it was they who finished top of the pile.
Kamil Jozwiak's stunning solo goal gave Poland the lead inside five minutes and Przemyslaw Placheta rattled the post as the host proved a significant threat on the break.
Poland was punished for sitting back in the second half, though, with Wijnaldum winning a penalty that Depay fired home before the Liverpool man saw his deflected header secure the win in the 84th minute.
Jozwiak put Poland in front when he surged away from Davy Klaassen down the left, cut inside of Daley Blind and stabbed in off the post.
Wijnaldum and Donyell Malen missed decent chances to restore parity before Placheta hared forward on the right and crashed a shot against the near post from an acute angle.
Kamil Glik and centre-back partner Jan Bednarek made important interventions to keep Wijnaldum and Depay at bay, but Lukasz Fabianski was needed to stop Frenkie de Jong equalising before half-time.
Krzysztof Piatek replaced Robert Lewandowski, who had been a doubt for the game with a muscular problem, at half-time and he was involved in a rapid break that ended with Placheta shanking wide.
Poland focused on defending and Fabianski did well to tip the Netherlands' first shot on target of the second half from Depay away from the bottom-right corner.
However, Fabianski was beaten by Depay from 12 yards in the 77th minute after Bednarek pushed Wijnaldum over in the area.
Wijnaldum completed the turnaround himself by flicking substitute Steven Berghuis' corner home, but it was only enough to secure second place in the group.