Brazil were leading thanks to Jheniffer's strike but conceded two stoppage time goals to Japan, who collected their first points after a defeat by Spain in Thursday's opener, courtesy of Saki Kumagai and Momoko Tanikawa.
Colombia bounced back after falling to hosts France and boosted their chances of making it to the next round with their first win thanks to Marcela Restrepo's volley and a goal from Leicy Santos.
The top two teams in each three groups advance, along with two best third-placed sides.
Brazil went ahead with a fine Jheniffer low shot in the 56th minute after a goal created by six-time Olympian Marta, who left the pitch to a standing ovation six minutes from time.
Japan, who had missed a penalty before halftime, levelled in stoppage time thanks to Kumagai's kick from the spot after a handball by Yasmim before substitute Tanikawa netted from long range after a misplaced pass by Rafaelle.
Elsewhere, Colombia opened the scoring in the 26th minute with a brilliant volley by Restrepo, who pounced on some sloppy New Zealand defending.
Leicy Santos's fine strike off the woodwork sealed the win for Colombia in the 72nd minute to move them on to three points.
Australia boosted their chances of making it to the next round with their first win in the competition.
In a goal feast in Nice, the Matildas rallied from two goals down to clinch a stunning 6-5 win over Zambia in Group B, with the Matildas' Steph Catley and Zambia's Racheal Kundananji scoring doubles, while Barbara Banda netted a hat-trick, the third to her name for an Olympic record.
Meanwhile, Spain reached the quarter-finals with a 1-0 win over Nigeria in Nantes thanks to Alexia Putellas' late winner.
![Spain celebrate Alexia Putellas' winner Spain celebrate Alexia Putellas' winner](https://livesport-ott-images.ssl.cdn.cra.cz/r900xfq60/c05b46c7-ad3d-4c02-97cc-d7e4b0603917.jpg)
The world champions had to wait until the closing stages in their Group C clash to break the Nigerian wall with a wonder free-kick from former Ballon d'Or winner Putellas.
Putellas struck five minutes from time beyond the Nigerian goalkeeper and defenders, who until then had frustrated Montse Tome's side.
Reigning champions Canada got a lifeline at the Paris Games following a 2-1 last-gasp win over hosts France, while the United States claimed wins to reach the quarter-finals on the second matchday of Olympic women's football on Sunday.
To finish the day's play, Canada's quest to defend their 2021 gold medal was marred following a drone spying scandal that led to a year-ban of coach Bev Priestman and a six-point deduction by world governing body FIFA from the Olympic tournament.
The top two teams in each three groups advance, along with two best third-placed sides, leaving Canada, now led by assistant coach Andy Spence, needing maximum points in their remaining Group A matches, on top of a favourable goal difference.
The slim Canadian hopes seemed to be dashed after France's Marie-Antoinette Katoto struck in the 42nd minute following a neat passing move.
But captain Jessie Fleming equalised 13 minutes after the break. The match looked to be heading for a draw before Vanessa Gilles seized on a rebound from the goalkeeper in the 12th minute of stoppage time to fire home.
Canada face Colombia in their final group match on Wednesday.
Four-time Olympic gold medallists USA carried on their good form in Group B and secured a 4-1 emphatic win over Germany in Marseille, thanks to a first-half brace from Sophia Smith and goals from Mallory Swanson and Lynn Williams.
Smith gave Emma Hayes' side an early lead with a simple finish in the 10th minute, before Giulia Gwinn equalised for the 2016 Olympic champions.
Swanson, who scored a quick-fire double in the win over Zambia, made it 2-1, while Smith's deflected goal before half-time and Williams' late effort sealed the rout.