At Estádio Algarve, the team led by Francisco Neto was in front of the scorer since the 34th minute, thanks to Diana Silva’s goal, but allowed the tie in the second half, at 78, by Elena Linari.
When it looked like the match would be decided through a penalty shootout, Italy managed to win, precisely in a penalty converted by Cristiana Girelli, in the 90+4 minutes.
With this defeat, Portugal failed to qualify for the semi-finals and will play Belgium on Saturday to decide the classification between the fifth and eighth places of the competition.
In the semi-finals, Italy will face New Zealand, who overcame the Belgians 7-6 in the penalty shoot-out, after the 1-1 recorded in regular time.
The New Zealanders opened the scoring through Olivia Chance, on 37 minutes, but Chloe Velde restored equality, on 89, forcing the match to be decided from the 11-meter mark.
The other semi-final will oppose Germany, the three-time winner of the tournament, against Norway, which has five trophies on its curriculum, the last of which was last year.
The Germans beat Sweden 1-0 in the FIFA World Cup 1-0, with a solitary goal from advanced Svenja Huth in the 33rd minute.
The holder of the trophy, Norway, operated the turnaround on Denmark and won the Nordic duel 2-1, with the goal of the triumph coming in clearing time.
Pernille Harder put Denmark ahead after seven minutes, but Elise Thorsnes, at 12, and Synne Jensen, at 90 + 3, secured the victory for the Norwegians.
The semi-finals of the 27th edition of the Algarve Cup are scheduled for Saturday.