Brazil's top two suffer shock defeats
Leaders Fluminense lost 2-1 away to 10-man Atletico Goianiense but are still three points ahead of Corinthians, who suffered their first home defeat of the season, 1-0 to Gremio.
In a match they had been expected to win against a team in the relegation zone, Flu went ahead after 23 minutes when Washington finished a move involving playmakers Deco and Argentine Dario Conca.
Seven minutes later, however, William shook off his marker to equalise and Flu went on to hit the bar twice before half-time.
Things looked to become easier for Flu when the home side's defender Gilson was sent off for a foul on Carlinhos, his second booking, but substitute Juninho scrambled in a winner in stoppage time.
"We should have won today's game. We knew Corinthians were losing and the chance was very big to open a bigger distance from them," disappointed Flu coach Muricy Ramalho told reporters.
"Now we must prepare the team for Wednesday. It's a match against a direct rival for the title and we must win it whichever way possible."
Corinthians, resting 2002 World Cup winners Ronaldo and Roberto Carlos for Wednesday, went down to a superb goal from their former midfielder Douglas, who nutmegged his marker and shot from outside the box in the 34th minute.
Gremio almost gave away their lead 13 minutes into the second half when Vilson brought down midfielder Bruno Cesar, conceding a penalty and being sent off.
Brazil goalkeeper Victor, however, saved the spot kick from veteran striker Iarley, who had another good chances minutes later saved on the line by defender Rafael Marques.
Corinthians are banking on Ronaldo, back two weeks ago from a three-month injury layoff, for a victory over Fluminense that would put them level on points with a game in hand.