The result after a 2-2 draw assured the Americans of reaching the final four at the women's quadrennial championship for the sixth straight time and sent the United States to a Wednesday semifinal against France.
Wambach's goal capped repeated U.S. chances in extra time, finishing with a header from the edge of the six-yard box off Megan Rapinoe's cross to the back post.
Shannon Boxx, Carli Lloyd, Wambach, Rapinoe and Ali Krieger all converted their penalties for the United States, which competed the final 25 minutes of regulation and the entire extra time with 10 players, while Solo dived to thwart Daiane's try with an extended right hand on Brazil's third attempt.
The victory was the Americans' 23rd in 28 meetings against Brazil and fifth straight.
Marta scored both Brazil goals, including a disputed second penalty in the 68th minute, to rally her side after the United States went ahead 74 seconds after the opening kickoff.
The five-time FIFA Player of the Year put Brazil ahead two minutes into the first extra period when Maurine worked her way to the end line on the left side and sent a bounding cross to the near post. Marta, with her back to goal, volleyed the ball on the bounce, looping it over her head to the back post where it hit the upright and dropped in the goal.
Brazil had to overcome an early setback when Christie Rampone served a ball from midfield that Wambach, standing at the top of the area, let run to Boxx on the left side. Boxx worked to the end line and rolled a cross into the goal box where Daiane tried to clear with her right leg, but only deflected it past goalkeeper Andreia.
The Brazilians equalized in the 68th on a disputed second penalty attempt. Marta drew the foul by flicking a ball over Rachel Buehler and then knocking shoulders as she neared the goal.
Australian referee Jacqui Melksham ejected Buehler, but Solo appeared to rescue the United States by blocking Cristiane's penalty try.
However, Melksham called another foul - either for Solo moving off her line or a U.S. player entering the penalty area early, yellow-carded the American keeper and awarded Brazil another attempt.
Marta converted the second penalty, driving it to her right while Solo dive the opposite way.
Brazil needed more than 20 minutes before getting a shot but then had at least an equal share of the possession.
Marta shot high after dribbling nearly the length of the field in the 23rd and Fabiana hit the bar with a cross in the 38th minute after a giveaway by the United States near the top of its own penalty area.
The Americans had a chance to double the lead in the 63rd when Carli Lloyd headed Megan Rapinoe's free kick off the crossbar.