Musiala struck for the second game running midway through the first half, much to the anger of Hungary players who felt a foul should have been awarded in the build-up to the goal.
Gundogan grabbed his side's second on 67 minutes as Germany eased to a second successive win in Group A, making sure they will progress to the knockout phase at least as one of the best third-placed sides.
Julian Nagelsmann's men can wrap up top spot when they play Switzerland in Frankfurt in their final group fixture on Sunday. Hungary are staring at elimination after back-to-back defeats and must beat Scotland if they are to stand any chance of reaching the last 16.
Germany unsurprisingly stuck with the same line-up that battered Scotland 5-1 in the first game of the tournament, ending a run of three major finals in which they had lost their opening match.
Hungary coach Marco Rossi made two changes following a disappointing 3-1 loss to Switzerland, bringing Marton Dardai into his three-man defence and starting Bendeguz Bolla at right wing-back.
A dismal first half left Hungary with too much to do against the Swiss and Rossi admitted beating Germany would require a "perfect match" from his team. Hungary almost struck in the opening seconds as Manuel Neuer raced out to take the ball off the toe of Roland Sallai.
Kai Havertz outmuscled Willi Orban only to be superbly denied by Peter Gulacsi, who thrust out his right hand to deny the Arsenal attacker. Robert Andrich's volley from the resulting corner was bravely headed behind by Bolla, but it wasn't long until Germany's persistence was rewarded.
Musiala cushioned the ball through for Gundogan and the Germany captain kept the attack alive after jostling with Orban, knocking it back for Musiala to slam in off the crossbar with a touch off Attila Fiola.
June 19, 2024
Hungary protests dismissed
Hungary were furious no foul was given for the contact between Gundogan and Orban that knocked the defender to the ground, the goal confirmed after a brief VAR check.
Dominik Szoboszlai's curling free-kick drew a terrific stop from Neuer soaring to his right, the goalkeeper kicking away the follow-up as Hungary tried to scramble in the rebound.
A key block from Jonathan Tah foiled a second opportunity in quick succession for Szoboszlai, with Musiala then drilling into the side-netting at the other end. Hungary had the ball in Germany's net in first-half stoppage time, but Sallai's effort was ruled out for offside after Neuer palmed away an Orban header.
Gulacsi clawed away a deflected Toni Kroos drive early in the second half before Hungary forward Barnabas Varga, who scored in the loss to Switzerland, nodded narrowly over from an inviting cross. Germany picked apart the Hungary defence with a patient attack to double their lead just past the hour.
Maximilian Mittelstaedt found space down the left and slid across a pass for Gundogan to sweep home from near the penalty spot.
Niclas Fuellkrug failed to get a finishing touch as Joshua Kimmich powered across the face of goal, with Gulacsi making smart saves to keep out Kimmich and Leroy Sane as Germany sought a third goal. Julian Nagelsmann withdrew his front three with the game under control to keep them fresh for the Switzerland clash.
Neuer had a nervy moment late on when he spilled a cross, but Kimmich cleared Orban's shot off the line to preserve the clean sheet for Germany - their first in eight games at the European Championship.
June 19, 2024