Mineiro striker Carlos netted his second of the match in the 91st minute to upset the defending champions, who had rallied from two goals down at the Estadio Governador Magalhaes Pinto.
League leaders Cruzeiro were comfortable 3-2 winners against Atletico PR on Wednesday, but they found it difficult against sixth-placed Mineiro over the weekend.
The first half was on track to end all square, before Mineiro netted two goals in as many minutes through Carlos and Diego Tardelli.
Mineiro striker Carlos broke the deadlock in the 39th minute, volleying the ball past Cruzeiro goalkeeper Fabio after Luan's deflected header fell into his path.
And Tardelli doubled the visitors lead two minutes later, when he got on the end of Jesus Datolo's outside-of-the-foot cross, volleying from close range.
Cruzeiro hit back on the stroke of half-time, with Brazil international Ricardo Goulart bundling the ball over the line - his 10th goal of the season.
The home side were on level terms seven minutes into the second half thanks to Alisson, whose bicycle kick left Mineiro custodian Victor helpless.
There was to be one final twist as Carlos headed powerfully across Cruzeiro shot-stopper Fabio in first minute of injury time.
After recording back-to-back wins, Mineiro have 37 points from 23 matches.
Cruzeiro remain top of the table with 49 points and seven clear of Sao Paulo, who suffered consecutive defeats.
Sao Paulo twice surrendered a lead as they lost 3-2 at fourth-placed Corinthians - their second loss in the space of a week following Wednesday's 3-1 defeat to Coritiba.
Goals from Souza and Edson Silva, sandwiched between Fabio Santos' penalty, had Sao Paulo leading 2-1 at half-time.
But it all fell apart after the break, with Alvaro Pereira's second yellow card leading to a penalty in the 66th minute and sparking a collapse.
Santos converted his second spot-kick of the match before Paolo Guerrero completed the comeback with 16 minutes remaining.
Corinthians, who are nine points adrift of Cruzeiro, finished the match with 10 men after two-goal hero Santos saw red six minutes from time.
Internacional are a point clear of Corinthians in third following their 1-0 win at Atletico PR on Saturday.
In other results, Goias crushed cellar-dwellers Palmeiras 6-0.
Hosts Goias scored four goals in the first half through Ramon, Esquerdinha, Erik and David, before Thiago Mendes and substitute Welinton added some gloss to the scoreline after the interval.
Palmeiras had Agustin Alione sent off in the 73rd minute.
Gremio's resurgence under Luiz Felipe Scolari continued against Chapecoense, winning 1-0.
Scolari's men sit fifth in the standings after seven games without defeat and six successive clean sheets.
Robinho was on target as Santos accounted for Figueirense 3-1.
Vitoria came from behind to beat Bahia 2-1 and Sport Recife edged lowly Coritiba 1-0.
Flamengo and Fluminense played out a 1-1 draw, while Criciuma and Botafogo traded penalties in a 1-1 stalemate.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.