What I normally use to distinguish erotica from just simply writing which addresses sexuality, is that in erotica, the writer attempts to arouse, just as in horror, the writer attempts to horrify. The aim is to elicit a particular emotional response. If a comedy doesn't make you laugh, it fails. If a tragedy doesn't make you cry, it fails. If erotica doesn't turn you on, it fails.
Now, of course, with all of these, there's going to be some variation in individual response. Lots of people don't think Monty Python is funny -- I find it hilarious. And most people seem to think Sienfeld is funny, but I never quite got it. Similarly, not everyone will be turned on, reading your erotica, and that's okay. Individual response. But if *no one* is turned on, reading your erotica, then I'd say it's not working as erotica.
At that point, you can either try to make it work as erotica, or you can decide it's something else entirely -- sexual writing, for example, a valid field in its own right.
By the way -- I'm not distinguishing between erotica and porn in any of the above. I think that's all just a matter of degree. In exactly the way that you have high tragedy at one end of a spectrum, and trashy tearjerkers at the other. And sometimes you want one, and sometimes you want the other. If you're looking to get off in five minutes before you fall asleep, you might well reach for a raunchy page of porn (that you'll read over and over a half-dozen times), instead of something complex, that requires a bit of thought to enjoy.
I think part of the confusion comes from people thinking that erotica is a genre of content, when it's really a genre of mood. (These are my definitions below, not generally accepted ones, but I stand by them. They work. :-) They are also not comprehensive lists of the various types.
GENRE TYPESA. Genres of mood: comedy, tragedy, horror, erotica, romance
B. Genres of content: science fiction, fantasy, western, mystery, immigrant lit., mainstream
C. Genres of style/structure: surrealism, magical realism, minimalism, metafiction, myth, folktale, fairy tale
There is overlap, of course, among the genre types. But generally speaking, a story will participate in 2-3 of the genre types above. So you can have a comic fantasy told in the surrealist mode. Or an erotic western told in the minimalist mode. Or a tragic mainstream story told in metafictional style. Mix and match, have fun. :-)
Note that *none* of the above are labelled 'literary'. Literary should never, in my opinion, be used as a genre term. Any of the three stories I just described could end up having literary value, or not. And even if they have no redeeming literary value, they can still be entertaining and fun, and worthwhile for that alone. Literary is a separate axis that just shouldn't come into genre discussions, and it's sheer sloppiness on our part that's allowed 'literary' to become synonymous with 'mainstream' fiction.