When Dante and Virgil approach the gates of Dis, the pilgrim-poet is afraid. This indicates that he's still at a relatively early stage in his spiritual journey and so lacks the confidence and self-assurance that he will display later on. But for now, Dante is in a state of fear, a state heightened by the fallen angels who abruptly slam the gates of Dis shut, thus barring his and Virgil's entry.
Virgil's entirely relaxed about the situation, however. He knows that a heavenly angel will soon be on his way to open the gates, thus allowing himself and Dante to continue on their journey. Sure enough, the heavenly angel soon arrives. And when he does, as well as opening the gates of Dis with the touch of his wand, he proceeds to give the damned a piece of his mind.
He reminds the fallen angels of what happened to Cerberus, the three-headed dog guarding the gates of Hades. The beast was dragged along the hard floor of the underworld by Hercules when he descended there to rescue Theseus. The implication of the heavenly messenger's remarks is that a similarly unpleasant fate awaits the damned if they lock the gates of Dis again in future.
Under the circumstances, the heavenly messenger has every right to be angry at the damned. Closing the gates of Dis goes against the divine command, which is about the most serious offense that anyone could've committed in Dante's day.
Further Reading