Silva had earlier fluffed his lines from 12 yards, which looked to be costly after Neto scored an own goal to put Mexico ahead, but it was to be Portugal's day in a match that boiled over with the sendings-off of two players at the end.
Portugal, without star man Cristiano Ronaldo this afternoon, created the first opening of the match as Gelson Martins got in behind and pulled the ball back for Nani, who was unable to make the desired contact.
Chances came and went for Oribe Peralta and Hernandez either side of half time, the latter again being thwarted by Patricio from close range.
Moments after Martins failed to find a way through with his volley, Mexico were ahead through a Neto own goal - the keeper seeing the ball bounce off him and over the line following a dangerous cross from Hernandez.
Pizzi could have levelled up on the hour but failed to find the net with his first-time effort, while Martins was brilliantly denied by Ochoa from a header two minutes later.
The game was becoming stretched and there was a good chance for Hernandez to seal it, only to be denied by Patricio, allowing Pepe to dramatically equalise in the 91st minute at the end of a Ricardo Quaresma delivery.
The winning goal arrived 15 minutes into extra time, as Silva this time converted his pen after the ball popped up and hit Miguel Layun on the arm.