Westworld (1973) or The Stepford Wives (1975)?
Wikipedia says Michael Crichton wrote the screenplay for Westworld August 1972, and Ira Levin's The Stepford Wives was published September 1972.
I say The Stepford Wives is the better story.