Victory for USA sets up a last-four meeting with France on Wednesday and continues their record of never missing the semi-finals.
The South Americans were able to recover thanks to a twice-taken penalty midway through the second half, and Marta doubled her tally just two minutes into extra time.
The match seemed over until Abby Wambach claimed heroine status with an equaliser deep into injury time, with USA then prevailing 5-3 on penalties.
Following the early goal USA maintained their bright start with Wambach narrowly missing with a header from a smart Christie Rampone free-kick.
Brazil finally started to come into the contest with Aline’s header hitting the side-netting from Marta’s well-taken corner.
Marta then went on a lung-bursting 80 metre run only for Rampone to maintain pressure on the Brazilian, who fired over.
Seven minutes before the interval came Brazil’s best chance of the half as Fabiana’s shot from a narrow angle hit the crossbar.
The second 45 minutes commenced in muted fashion before bursting into life midway through the half. Marta was brought down in the penalty area, with USA suffering a double blow as defender Rachel Buehler was dismissed. Cristiane saw her penalty saved only for a retake to be ordered, and this time Marta coolly converted.
Extra time commenced perfectly for Brazil as Marta scored another high-quality goal worthy of the world’s greatest stage. The five-time FIFA World Player of the Year collected a pass from the left and deftly flicked it home via the far post.
Despite playing with ten players, USA continued to press at every opportunity and finally got their reward two minutes into injury time as a superb Megan Rapinoe cross found Wambach, who stretched to head home just inside the post.
The only failure in the penalty shootout was Brazil defender Daiane, who saw her effort saved by Hope Solo, allowing Alex Krieger to convert for a famous USA victory.
Player of the match: Hope Solo (USA)