Ricardo Quaresma scored the winning spot-kick after Jakub Blaszczykowski's effort was saved by Rui Patricio.
Robert Lewandowski had fired Poland ahead in the second minute with teenager Renato Sanches equalising via a deflected strike.
Portugal's semi-final opponents will be either Wales or Belgium.
Remarkably, Portugal have reached the last four without winning a game in normal time following three draws in a group in which they finished third and an extra-time win over Croatia in the last 16.