Whenever people use the word 'gratuitous', they always use it in terms of violence, profanity, or nudity. I have talked about profanity a couple of times, and I have come to the simple conclusion that profanity is not 100% awful, but it cannot be used willy-nilly. There is a determining line, which is largely based on style and character.
For something to be 'gratuitous', it simply needs to be out of character. Gratuitous profanity is unneeded swearing. Gratuitous nudity is showing the naked body for no reason that adds to or advances the story. And, really, anything that in your story that does not develop your story is gratuitous.
This plays right into my writing style: concise. Writing concisely means you are not doing anything gratuitously. You are giving the audience exactly what it needs - no more and no less.
Arguably, gratuitous writing is not terrible. Sometimes a ridiculous, over-the-top action movie with copious amount of bullets and explosions is the most satisfying thing, even if it is way more than the story needed (although the counterargument is that it was just the right amount for an over-the-top action movie).
In that case, being gratuitous is a fine line. Tasteful or artistic or plot-based nudity may be acceptable, but that leads to fan service. And fan service may be acceptable, but that leads to flat-out pornography. And pornography may be acceptable, but nobody is watching it for the plot.
When you add things that do not develop your stories, you take away from those stories. A story that diverges enough from one path ends up taking another path. If you are trying to tell a particular story, tell the story. If you want to make a porno, make a porno. Just don't try to pass one off as another.