Yes the act was a little extreme, but in the end it was justified. The Jedi attempted an illegal coup against the legal head of state of the Republic just because of his religion. To make that even worse Windu was going to kill the guy without a trial just because "he's to dangerous" and mainly because of his religion.
-
Politcally? Arguable. The Jedi were staging an illgeal coup de'tat against him, but he did have nearly unlimited power and he was far past the end of his term. Morally? No. He was turning the Republic into a totalitarian empire, which goes against everything the Republic and Jedi stood for. Plus, Palpatine would have done the same thing with the Sith if a Jedi were in charge, so the religion argument is out of the question.