The attacking star and team captain Cristiana Girelli elegantly scored the leading goal for Italy.
The Italian women had the margins on their side and seemed to be holding their lead throughout the match. Only after a longer VAR review was Diana Silva's equalizer ruled out for offside.
But Portugal continued to push, hit the crossbar and then Diana Gomes equalized in the final minutes.
Italy needed to win to book a place as one of the eight nations in the quarterfinals in Switzerland and dominated the events on the pitch.
Emma Severini celebrated what she and her teammates thought was an Italian leading goal at the end of the first half.
But the assistant referee's flag was up early – and quite right so – for offside.
Cristiana Girelli was very close to breaking the match deadlock shortly afterwards, but Portugal's goalkeeper Patricia Morais made one of many fine saves – and the second in the first half on a shot from Juventus star Girelli.
With around 20 minutes left, Morais was finally forced to surrender to Girelli. The Italian elegantly curled in her 59th national team goal into Morais' corner.
The result means that Italy has four points while Portugal has one. In the battle for second place in the group, Italy also has a clear advantage of better goal difference, but concludes the group stage against Spain while Portugal takes on eliminated Belgium.