Grats (sometimes spelled 'gratz') is a commonly used abbreviation for congratulations. It is most often used when an achievement is announced, or a player reaches a new level. It may also be used sarcastically when someone does something stupid.
In guild culture, there is an expectation that at least one person will say 'grats' when someone announces they dinged or earns an achievement, especially for significant milestones such as reaching maximum level or completing a meta achievement.
Some people find replying to dings and achievements annoying, to the extent that addons such as Grats Bot have popped up to automate the process.