Many fans of the game complain about how easy the boss battle with Gary is. It makes sense if you think about it, though. Despite Gary's speech, he never really planned on actually fighting Jimmy. He thought Jimmy would have been expelled (which he was) and/or the whole school would have turned on him (which they did, for a time). He never expected the drop-outs to help Jimmy take back the school again. So he panicked, turned the school into a battleground, tied up the principal and planned to blame it on Jimmy but it backfired.
Plus, Gary's skill is in manipulation. Once somebody's seen through his bullshit, he's just a Dirty Coward who can't back up his tough talk.
A lot of Gary's manic behavior and his less than satisfactory reasoning for manipulating everyone. He states twice that he's not been taking his meds. The mission before he betrays Jimmy, you see him frantically talking to himself. His betrayal and eventual taking over the school can be explained by Gary literally being out of his mind.