Manchester City midfielder Gundogan was whistled upon his introduction as a second-half substitute in the 2-1 win, having received a similar reception in the loss to Austria the previous week.
Gundogan and Arsenal's Mesut Ozil, both of Turkish descent, have attracted criticism for their recent meeting in London with Turkey's president Recep Tayyip Erdogan, who is the subject of scrutiny from human rights groups and exiled Turkish citizens over his government's treatment of journalists, civil rights activists and political opponents.
The German Football Federation reprimanded the pair for being exploited by an "election campaign stunt" and the BayArena crowd voiced their disapproval on Friday.
Hummels, however, encouraged supporters to move on from the episode and unite behind the team as they attempt to defend their World Cup crown in Russia.
"You shouldn't be booing Germany internationals during a home game. Especially when there is such a good atmosphere, like it was at the beginning," Hummels told reporters.
"It was a nice atmosphere for a friendly, the fans were celebrating, they were clapping for successful plays.
"But when they started booing, they also stopped supporting the other players. It seemed like everybody was waiting until Ilkay had the ball to boo him.
"I was not happy with that and I hope that this is not going to happen for a longer time, because everybody on this earth made a mistake once and they both didn't do a lot wrong before that."
Marco Reus, who played alongside Gundogan at Borussia Dortmund, echoed Hummels' sentiments.
"I could not understand the whistles against Ilkay. If you saw him in our dressing room, it affects him deeply," Reus said.
"He does not deserve it. We stand by his side for sure."
Ozil was an unused substitute during the match as he continues his rehabilitation from a knee injury sustained against Austria.