Spain are aiming to become the first side to win Olympic gold after lifting the Women's World Cup, having defeated England in the final of that tournament last year.
Ballon d'Or winner Bonmati levelled after Aoba Fujino's stunning 13th-minute free-kick opener in Nantes, before the Spain midfielder teed up Mariona Caldentey's winner 16 minutes from time.
That result saw Montserrat Tome's side seize top spot in Group C ahead of Brazil, who edged past Nigeria 1-0 thanks to Gabi Nunes' first-half finish.
Elsewhere in Group A, defending champions Canada put off-field issues to one side by overcoming New Zealand 2-1 thanks to goals from Cloe Lacasse and Evelyne Viens in Saint-Etienne.
Canada's integrity had been questioned ahead of the game in the wake of a spying scandal, with assistant Andy Spence serving as head coach after Bev Priestman volunteered to sit out.
Priestman, two members of her staff and the Canadian Olympic Committee are being investigated by FIFA's disciplinary committee after a drone was spotted flying over New Zealand's training on Monday.
"Obviously the timing was quite terrible," said Canada captain Jessie Fleming of the drone incident after her side battled back following Mackenzie Barry's early opener.
"But I think for us, we've just leaned into each other as a player group and we really just want to focus on being here and playing."
Hosts France seemed on course for a routine victory in the other Group A game after Marie-Antoinette Katoto's first-half double and Kadidiatou Diani's goal against Colombia.
However, Catalina Usme pulled one back from the spot and Manuela Pavi further reduced the deficit nine minutes later, only for Mayra Ramirez's late red card to help France hold out for a 3-2 victory.
Meanwhile, Germany swept aside Australia 3-0 in Group B, inflicting the Matildas' joint-heaviest defeat at the Olympics, along with a loss against the same opponent by the same scoreline, at Sydney 2000.
Efforts from Marina Hegering, Lea Schuller and Jule Brand sealed the victory for the DFB-Frauenteam against the Tokyo 2020 semi-finalists.
Hayes, who took charge of the USWNT in May, has won six of her seven games at the helm, conceding just twice in that time.
The USA, along with Spain, are the only two sides to win all of their games at the Paris Olympics so far and will have great confidence heading into the knockout stages.
Trinity Rodman's second goal of the tournament two minutes from half-time sent them on their way, as Korbin Albert's 77th-minute strike saw her become the the youngest substitute scorer for the USA at the Olympics since Mallory Swanson against Colombia in 2016.
Alanna Kennedy's late strike would take some of the shine off an otherwise impressive display, but the United States dominated from the first whistle.
Hayes' side accumulated an expected goals (xG) of 2.82 from the 21 shots they had compared to Australia's 0.46, ending the match with 71.7% possession.
The United States will face Japan in the quarter-finals of the tournament, while Australia face a nervous wait to see if they qualify as one of the best third-placed teams.
In the other Group B encounter, Germany confirmed their place in the knockout stages alongside the United States following a comfortable 4-1 win over Zambia.
Lea Schuller opened the scoring in the 10th minute, with Klara Buhl adding the Germans second of the afternoon shortly after the restart.
Zambia captain Barbra Banda threatened to make the encounter a more difficult affair with her fourth goal of the tournament two minutes later.
But Schuller and Elisa Senß would add further gloss to the performance soon after to secure second place in the group.
Germany's triumph sets up a meeting with the runners-up of Group A, which could be either one of Colombia, France, Canada or New Zealand.
Gabi Portilho's 82nd-minute goal proved decisive in Nantes as Brazil claimed a place in the semi-finals.
Matters could have been vastly different for France had Sakina Karchaoui converted an early penalty, but she fluffed her lines from 12 yards.
Brazil will face Spain in the last four, while the other semi-final will see Germany take on the United States.
Germany drew 0-0 with defending champions Canada after 120 minutes of action in Marseille.
But Ashley Lawrence and Adriana Leon saw their penalties saved by Ann-Katrin Berger, who subsequently stepped up to slot in the crucial spot-kick as Germany secured a 4-2 shootout victory.
Data Debrief: Quarter-final hoodoo continues for France, Germany meet the USA again
France have now been eliminated at the quarter-final stage in seven of the last eight international tournaments in which they have participated.
Meanwhile, the USA and Germany will meet again in the last four of a major tournament for the fifth time, which is two more than any other match-up in the history of the Women's World Cup and the Olympics.
Giulia Gwinn gave Germany the lead from the penalty spot but Alexia Putellas had a chance to send the game to extra time at the death, only to be denied by Berger.
In a very even first half, Spain failed to register a shot on target, though they had the better chances as they twice struck Berger's crossbar. Teresa Abelleira curled a free-kick against the woodwork before Aitana Bonmati rifled a powerful long-range effort off it just before the break.
Germany's attempts to play on the counterattack eventually paid off, with Cata Coll giving away a penalty when she rushed off her line, only to crash into Gwinn.
The winger stepped up to take the spot-kick that she won, sliding it into the bottom-right corner and sending the goalkeeper the wrong way.
Berger later pushed away Jenni Hermoso's tame close-range header, but Spain would get one last chance when Janina Minge tripped Lucia Garcia in the box with mere seconds remaining.
Putellas' penalty was at a comfortable height for Berger, who dived the right way and got two strong hands on the shot to ensure her team got the prize.
Data Debrief: Gwinn's winning touch
Gwinn was the biggest attacking threat for Germany in the bronze-medal match, having the most shots (two) and more touches in the box (five) than any of her team-mates.
It is the fourth Olympic bronze that Germany have won, and their first since a run of three straight between 2000 and 2008.
Meanwhile, Spain's torrid run against Germany goes on - they have never beaten Die Nationelf in their history, and their wait for a first women's football medal at the Olympic Games will continue for at least another four years.
Mallory Swanson was denied a winner in normal time, and though Germany pushed for a late equaliser, Emma Hayes will take charge of a final in her first tournament as the USA's head coach.
Unlike in the group-stage meeting between these sides, which finished 4-1 to the dominant Stars and Stripes, it was Germany who almost took a first-half lead, with Alyssa Naeher reacting quickly to get down and push Jule Brand's low shot wide.
In the 86th minute, Mallory Swanson thought she had snatched a late winner – she latched onto Trinity Rodman's throughball and drilled her low shot across goal into the bottom corner, but the offside flag denied her.
Swanson turned provider five minutes into extra time, as Smith timed her run to perfection, darting in behind to beat Berger for power with a wonderful effort.
There was late drama though, as Naeher brilliantly smothered Laura Freigang's close-range header before Smith was denied a second goal at the other end by Berger's quick thinking.
Data Debrief: Smith's touch of gold
Smith has been in top form during the Olympics and netted her third goal in the competition as she carried her team into their 11th major tournament final.
She is also the second USA player to score in at least three consecutive appearances against Germany, after Abby Wambach - five straight from 2009-12.
Meanwhile, it was familiar heartache for Germany as they were eliminated in the knockout rounds of a major tournament (Olympics and World Cup) for the 10th time, with half of those coming at the USA's hands.
Sophia Smith netted a first-half double on either side of Mallory Swanson's goal before Lynn Williams wrapped up the points late on.
Giulia Gwinn had given Germany hope by equalising, but the USA were too strong as they ruthlessly booked a place in the knockout rounds.
The USA made a quick start, with Smith darting in front of her marker to slot a close-range tap-in past Ann-Katrin Berger, only for Gwinn to cancel it out 11 minutes later with a pinpoint shot into the bottom-left corner.
Emma Hayes' side soon asserted their dominance though – Swanson reacted quickest to latch onto Smith's saved shot, firing in from an acute angle on the left.
Smith then got her second just before the break, helped by a huge deflection, as her effort looped over Berger before bouncing over the line off the inside of the far post.
Jule Brand struck the woodwork just after the hour mark before further misery was piled on the Germans as captain Alexandra Popp was forced off late in the second half with a knee injury that they will be hoping is not too serious.
Williams rounded things off by making a quick impact off the bench, finishing off a lightning-quick counter-attack just under four minutes after coming on.
Data Debrief: Smith and Swanson on song
The USA got the job done in the first half, ensuring Hayes became just the second coach to win each of their first two major tournament matches in charge, after Anson Dorrance in the 1991 World Cup.
Swanson added to her double against Zambia with another goal in Marseille and is just the second player in USA's history to net three times in the group stage of a single Olympics, after Abby Wambach in 2012.
Before today, the winner of each of the five previous major tournament meetings between the USA and Germany has gone on to win the entire tournament, and Hayes will be hoping that is a good sign of what is to come.
The 23-year-old's 95th-minute strike proved the decisive goal of the USWNT’s 1-0 semi-final victory against an injury-stricken Germany.
The result means new coach Emma Hayes will have the chance to go for gold in her first major tournament at the helm.
Smith dedicated her goal to the effort of the whole US squad under the ex-Chelsea boss.
"I just saw an open net in front of me and knew I had to step up in the big moment," Smith told NBC. "I felt I had to do that for this team, we've been working so hard.”