Feelings in and of themselves are not sinful, just as temptations in and of themselves are not sinful. Morality only comes into play when there is a movement of the will. In other words, it’s what we do with the feeling or how we respond to it that is important. There are certain responses to anger that are sinful, but there are also responses to anger that are good, so good in fact that it would be a sin not to “get angry.”
Anger is sinful when it leads to the harboring of ill will against a person, when it desires that a person be harmed, or seeks vengeance upon a person who does not deserve it. If it is contrary to love of God, or love of neighbor, or is rooted in our own wounded pride then it is usually sinful. An example would be flying into a rage because someone borrowed your pen, or wishing that someone would die because that person insulted you, or hoping that the star athlete on the opposing team would fall and break his leg so that your team would win.
Anger is good when it is rooted in love of God, love of his Church, love of Truth, or a desire that His Will be done in all things. This type of good or just anger is typically called “righteous indignation.” So, for example, the anger we feel at the fact that millions of unborn babies are dying because of the atrocity of abortion – that’s righteous indignation. Or, when we respond passionately to falsehood, to the profanation of the sacraments, or to people who disparage the Church, we respond rightly. In fact, to not have our feelings aroused by these injustices can be a sin if it is rooted in “lukewarmness” or apathy. We should love God, love Truth, love life, and love justice enough to reject in no uncertain terms anything that is contrary to these things.
There are many examples in Scripture of righteous indignation. When Jesus drove out the money changers (cf. Mt 21:12), called the Pharisees a “brood of vipers” (Mt 3:7), and condemned the wicked servant (cf. Mt 18:32), he was displaying righteous anger. Other examples include Moses’ slaying of the idol worshippers (cf. Exo 32:15-29) and God’s destruction of Sodom and Gomorrah (cf. Gen 19).
I hope that helps.