I've encountered the phrase and looked up online, but didn't find a good answer. They (link1 link2) were basically saying it's a unjust matter, without explaining the exact connotation and what does 'grave' mean in this phrase.
This is close to being a dictionary question. Wiktionary gives this relevant definition for "grave":
Serious, in a negative sense; important, formidable. [from 19th c.]
This pretty much covers it. However, what the dictionary doesn't say is that this is a "sticky" adjective. (I'm sure there's a more technical grammar term for it, but I don't know it).
What that means is that you will almost always hear "grave" used to modify a small number of words, notably "injustice" or "insult" or "error." They are not quite set phrases or cliches, but they have "stuck" together.
So while you will never hear a native speaker say:
I had a grave realization this morning.
and you would be unlikely to hear even something like:
Gather round; I'm afraid I have grave news.
you might well hear someone say:
The lack of celery in your beef jerky is a grave injustice to vegetarians.
It means injustice, which is so serious or great that it is a cause for concern or worry.