The forward headed home with just seconds remaining to deny the Stars and Stripes back to back victories
A 95th minute equaliser from Silvestre Varela saw Portugal salvage a 2-2 draw with USA and deny Jurgen Klinsmann's men immediate qualification to the last-16.
The USA had come from behind to lead 2-1 on Sunday and looked to have ended Portugal's World Cup campaign in Manaus, before Cristiano Ronalo got free on the right in the fifth minute of second-half stoppage time and picked out Varela, who powered a header past Tim Howard.
An early Nani goal saw Portugal respond well to their devastating 4-0 loss to Germany last week, but second-half strikes from Jermaine Jones and captain Clint Dempsey put the USA in front and on the verge of the last-16.
But Varela's late header ensured the top two positions in Group G remain up for grabs with Germany (four points) on top, level with the USA, while Ghana and Portugal both have slim chances of advancing with one point each.
Despite speculation that a knee injury would keep him out of Portugal's line-up, Ronaldo started, while Helder Postiga, Ricardo Costa, Andre Almeida and Beto replaced the unavailable quartet of Hugo Almeida (thigh), Pepe (suspension), Fabio Coentrao (groin) and Rui Patricio (thigh).
Klinsmann picked Graham Zusi to replace the injured Jozy Altidore (hamstring), with the Sporting Kansas City midfielder lining up on the left and Dempsey moving into a lone striker's role.
The match started horribly for USA with Nani opening the scoring in just the fifth minute.
Miguel Veloso's poor cross bounced in front of Geoff Cameron and the central defender sliced his clearance to the back post, where Nani took a touch and then smashed his shot high into the net with Howard stranded.