When do you think language, violence, or sexual content becomes gratuitous in a work of fiction?
The short answer:
When it distracts a reader from the story.
The long answer:
Let me respond by first telling you a story. (After it, it's what we storytellers do, right?)
Why do I share that? Because she recognized the difference between what might be inappropriate to her personal sensibilities and what might be gratuitous for her stories. She understood that while certain words might make her uncomfortable, they fit her characters perfectly.
Repeat after me: My character aren't me. They will say things I won't say. They will do things I won't do. They will have different beliefs than I have.
Your characters don't have to behave like good boys and girls all the time. It's not their job to make your grandmother's idea of polite manners their standards of behavior. They are free to be themselves and do as they must in order for you to tell their tales and entertain readers. In short, they will behave in ways that you may or may not emulate. Or they may stop far short of what you yourself might say or do.
That's the first step, Grasshopper.
So here's the G-Line (line of gratuitousness, I just coined that, like it?) for me. As long as our characters say or do it without breaking character or bogging down your story, it's on the right side of the line. When they have to break character to say or do it or when the action rips a reader from the illusion world the story is supposed to transport him or her into, then you've crossed that line and become gratuitous.
If people complain about the language or violence or sexual situations jarring them out of the story then it's bad writing on your part.
If they complain about the mere existence of language or violence or sexual situations in your work at all, then it's on the reader who needs to find a different book.
Caveat#1: This is all moot when you are writing for a publisher who requires or requests a certain level of rating (such as PG-13) from you. That's a contract, and you suck it up and play within the fence the publisher has built around your playground.
Caveat #3: Don't bill your story as something that is isn't. If it's a book meant for adult audiences, then have at it. It's intended for the YA market, let a potential reader know it's got a disturbing scene of violence or sex or even some language in it IF IT'S NOT TYPICAL FOR THE MARKET. DC Comics and video games are doing a great job of this at the moment. And no, it's not censorship to reveal the type of content in your book, no matter who tries to convince you that it is. It's respect for you readers.