Nudity and sex are overall far from gratuitous in BG3.
Of course it is gratuitous. As has already been stated, remove the 'romance' and sex and it in no way affects the main plot and most of the time it does do much for the sub-plots. The hobgoblin back-scuttling the ogress in Act 1 is there for why?
Only if your definition of "gratuitous" is anything not impactful to the main storyline in a role-playing game. It serves its purpose for people who want to interact with that aspect of the game.
My only complaint about romances is they take away from friendships. I liked Alister from DA:O, who becomes your bro without a weird rejection scene that would definitely un-bro him. WOTR is the biggest offender, locking a lot of personal backstory behind romances or having companions hit on you without any prompting from the player.
I am using the dictionary definition of the word - not called for by the circumstances : not necessary, appropriate, or justified.
I have never 'romanced' any character in WOTR and if I have missed any personal backstory then it is down to me not Owlcat. In any case, romance and backstory is a different kettle of kippers than sex, gratuitous or otherwise. I'm currently replaying WOTR and haven't noticed anyone 'hitting' on me. Granted I'm only in Act 2 (not taken Drezen yet). So far I have only noticed one possible romance opening in the dialogue, with Sosiel, which I ignored and we moved on.