At Cardiff City Stadium, the score stayed 0-0 after 90 minutes and extra time before going to penalties.
Poland prevailed 5–4 in the penalty shootout, with former Arsenal player Wojciech Szczesny stopping the game-winning spot kick from Leeds winger Daniel James.
Robert Lewandowski, Sebastian Szymanski, Przemyslaw Frankowski, Nicola Zalewski, and Krzysztof Piatek all scored five perfect penalties against Danny Ward for Poland.
Poland has advanced to their fifth straight European competition as a result.
They will compete in the June tournament in Germany, where they will be grouped with France, the Netherlands, and Austria.
Wales made it to the round of 16 in the postponed 2021 competition and the semi-finals of the 2016 UEFA European Football Championship.
Manager Rob Page told news that losing to Poland “hurts”.
“It’s a cruel game, that’s what I’ve said to the players – one kick away from qualifying,” he stated.