* Necessary
* Essential
* Required
* Justified
* Merited
* Earned
* Deserved
Gratuitous means "unnecessary" or "uncalled for". So the antonym would be something that is needed or deserved.
For example:
* Gratuitous: "His insults were gratuitous and hurtful."
* Antonym: "Her criticism was necessary to help him improve."
The best antonym will depend on the specific meaning of "gratuitous" in the context.