The Brazilian side fell behind after 18 minutes of the last-four tie in Doha but launched a second-half response to defeat the AFC Champions League holders.
Giorgian de Arrascaeta levelled shortly after the restart, Bruno Henrique edged Flamengo in front late on and an own goal put the game beyond Al Hilal.
It means the winners of Liverpool’s semi-final showdown with Monterrey on Wednesday night will face Flamengo in Saturday’s final at Khalifa International Stadium.