unfortunately, an excellent GMAT will generally be seen as a bonus point, but not as something to offset weak grades. Most consultancies have very strict limits when it comes to grades (incl. Master, Bachelor and A-levels) where you may not pass the threshold.
However, these thresholds vary across consultancies and not all consultancies require "excellent" grades (as they claim), but rather consistently "good" grades, then taking into account the overall picture of grades, working experience and bonus points. It may also depend on your type of studies and your university, where precisely that threshold is going to be applied (for computer science very likely lower than e.g. for business).
In my opinion, taking the GMAT can only increase your chances, but it may make sense to test upfront with a few consultancies whether you would be invited before you start with preparations.
Hope this helps!