Pepe headed the Seleccao into the lead from a corner, before Helder Postiga put them further in control with a confident finish from close range.
But, Bendtner, on his 50th appearance for Denmark nodded one back for his side four minutes before half-time before completing the recovery with another header nine minutes from the end.
The action was not over, however, as Silvestre Varela had the last laugh, grabbing the winner with a sublime effort in the 87th minute to put Portugal level on three points with the Danes, and take the race for a quarter-final...