Belgian midfielder Youri Tielemans scored twice, including the winner from the penalty spot in the 120+5th minute, while forward Romelu Lukaku netted once.
The match took place at Seattle Stadium. Senegal, who led 2-0, were eliminated despite a strong performance. Belgium advanced to the Round of 16 through resilience in the closing stages.
Senegal took a deserved 2-0 lead with goals from midfielder Habib Diarra in the 24th minute and forward Ismaïla Sarr in the 51st minute. Belgium mounted a late rally as substitute forward Romelu Lukaku scored in the 86th minute, assisted by defender Thomas Meunier, followed by Tielemans heading home an inswinging cross from winger Leandro Trossard in the 89th minute to force extra time.
Senegal controlled much of the first half and early second half with clinical finishing, but Belgium dominated the final minutes of regulation and extra time, securing victory via a late penalty converted by Tielemans.
Belgium progress to the Round of 16 with momentum from The comeback. Senegal exit after a competitive display in the group stage and knockout round.
Belgium will face the winner of the United States vs. Bosnia-Herzegovina match on July 7.