User blog comment:IamJakuhoRaikoben/Chapter 454: Flying Dragon Squad and Osprey Squad, Review./@comment-4449950-20150929043128/@comment-3987368-20151001065929

To answer your question, yes, Fate Stay/Night started as an eroge visual novel. The anime adaption cut all the sexual content out, which included (supposedly) sexual context involving Ilya and her servant (even more shocking when you know who her servant was).

Fate/Zero was written by Gen Urobuchi of Madoka Magica and Psycho Pass fame (among others) and was actually written as a light novel prequel to Fate/Stay Night. It doesn't have any eroge elements though as far as I've heard. I'm in the middle of the anime's first season at this time.