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 was in the box seat after winning the opening leg 1-0 away to Gremio in Porto Alegre last week.
Former AC Milan attacker Luiz Adriano found the back of the net in the 14th minute after a scramble as Palmeiras moved ahead 2-0 on aggregate.
But Gremio, which went down to eventual champion 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.