Long story short, he had a ridiculous contract worth 7.3M/year for 7 years. Mind you, with that money, it buys you comparable players like Joe Thornton and Patrick Marleau. For a guy of his pay-grade, his stat sheet numbers are pretty abysmal. The running joke is: he scored 2 goals last year, making 3.4M/goal. He scored 7 goals the year before, making 1M/goal.
After this past lockout, teams were granted two buy-outs. Naturally, Montreal released Gomez and he got paid. He just signed with the Sharks today for 700k-1year contract