The match went all the way to extra time, but Eder proved to be the hero with a 109th-minute winner to stun the host nation at the Stade de France.
The first sight of goal went the way of Portugal after just five minutes when Nani raced on to a ball over the top, but he lifted his effort over the crossbar.
France had won the last 10 meetings between the two teams stretching back more than 40 years, and the hosts soon began to take control of the contest in Saint-Denis.
Paul Pogba spurned their first shooting opportunity with a wild strike over the top from the edge of the box, but the first clear opening fell the way of Antoine Griezmann when the striker sliced an effort wide from a tight angle.
Griezmann went into the match as the tournament's top scorer with six goals, and he almost added to that tally moments later with a looping header that Rui Patricio had to tip over.
Olivier Giroud climbed highest from the resulting corner to plant a downward header towards goal, but it was straight at the keeper, who gathered it comfortably.
Portugal talisman and captain Cristiano Ronaldo, who was bidding to become the highest scorer in European Championships history, had been caught by a heavy challenge from Dimitri Payet earlier in the match, and although the 31-year-old tried to continue he was ultimately forced to leave the pitch on a stretcher.
The Real Madrid man was in tears as his Euros dream ended, and his departure seemed to take some of the buzz out of the game too as the two teams began to cancel each other out.
Moussa Sissoko was the one player who looked as though he could make a difference, and midway through the half he made a powerful run forward before lashing a deflected effort over the crossbar.
The Newcastle United midfielder then span away from his man in the penalty area to create shooting space, only to fire his effort straight at Rui Patricio.
Portugal had a rare sight of goal towards the end of the half when Jose Fonte rose highest inside the area but failed to test the keeper with his header.
Chances continued to be at a premium in the second half too, with Pogba being forced to resort to trying a 35-yard volley before Griezmann sent a tame effort into the arms of Rui Patricio.
It was Griezmann who had the biggest chance of the contest shortly after the hour mark too, escaping his marker to latch on to a cross from Kingsley Coman, only to glance his header over.
Coman then acted as creator for Giroud, sliding a pass down the left channel for the Arsenal man, whose low effort was kept out by the keeper.
Hugo Lloris was finally called into action for the first time with 10 minutes remaining, with the France skipper almost being caught out by Nani's mis-hit cross.
Lloris could only claw the cross as far as Ricardo Quaresma, but the keeper recovered in time to keep out the winger's acrobatic follow-up effort.
It was France who were asking most of the questions in the closing stages, though, and Sissoko almost found the breakthrough with a piledriver from range that Rui Patricio needed to push away.
The hosts were inches away from winning the match right at the death when Andre-Pierre Gignac turned his man inside the area, but the striker scuffed his finish against the upright and the rebound eluded Griezmann.
There was to be no breakthrough inside the 90 minutes, though, as the match went all the way to extra time, and Portugal came closest to scoring in the first period of the added 30 when Eder climbed highest in the box to steer a header towards goal, but it was too close to Lloris.
Fernando Santos's side came even closer after the interval when Raphael Guerreiro curled a free kick against the crossbar, but France failed to heed the warning signs and Portugal wouldn't have to wait much longer before finally breaking the deadlock.
It was Eder who wrote himself into the history books with the winner, cutting inside before picking out the bottom corner with a low 25-yard strike that Lloris couldn't get to.
There was no way back for France in the closing stages as they fell to defeat in a major tournament on home soil for the first time since 1960, missing the chance to win a record-equalling third European Championship crown.
Portugal, meanwhile, have won the first major trophy in their history having previously reached six semi-finals without success.