AC Milan full-back Hernandez netted his first France goal in the 90th minute of his second international appearance after France had come back from 2-0 down at half-time through strikes from Karim Benzema and Kylian Mbappe.
Didier Deschamps' side will face La Roja in Sunday's final at the San Siro in Milan after an exciting encounter which Belgium thought they had won in the final minutes when Romelu Lukaku netted from Yannick Carrasco's cross.
However with the Red Devils players still celebrating, Lukaku's first-time finish was ruled out for offside.
And with the match looking like it was heading to extra-time, Hernandez collected the ball on the left before rifling home the winner.
He had started the match alongside his brother Lucas Hernandez, making the pair the first two brothers to play for France since Herve and Patrick Revelli featured in a friendly against Romania in 1974.