Everton and Alisson scored within quick succession in the first half to level the quarter-final tie 2-2 on aggregate as Gremio progressed on away goals.
Luiz Felipe Scolari's Palmeiras were in the box seat after winning the opening leg 1-0 away to Gremio in Porto Alegre last week.
Palmeiras – who lost to Boca Juniors in last season's semis – boosted their hopes when Luiz Adriano scored the first goal of the night in Sao Paulo.
Former AC Milan attacker Luiz Adriano found the back of the net in the 14th minute following a scramble as Palmeiras moved ahead 2-0 on aggregate.
But Gremio, who went down to eventual champions River Plate in the 2018 semi-finals, rallied to turn the match on its head.
Brazil international Everton volleyed Alisson's free-kick past Palmeiras goalkeeper Weverton from an acute angle in the 18th minute before Alisson completed the comeback four minutes later.
Gremio will face either Flamengo or Internacional in the final four of South America's premier club competition.