The film was initially conceived to be a dark drama about sex work in Los Angeles in the 1980s. The relationship between Vivian and Edward also originally harboured controversial themes, including the concept of having Vivian addicted to drugs; part of the deal was that she had to stay off cocaine for a week, because she needed the money to go to Disneyland. Edward eventually throws her out of his car and drives off. The movie was scripted to end with Vivian and her sex worker friend on the bus to Disneyland. These traits, considered by producer Laura Ziskin to be detrimental to the otherwise sympathetic portrayal of her, were removed or incorporated into the character of Kit. These deleted scenes have been found in public view, and some were included on the DVD released on the film's 15th anniversary. One such scene has Vivian offering Edward, "I could just pop ya good and be on my way", indicating a lack of interest in "pillow talk". In another, she is confronted by drug dealers outside The Blue Banana, and rescued by Edward and Darryl.
The film bears striking resemblances to Pygmalion myths: particularly George Bernard Shaw's play of the same name, which also formed the basis for the Broadway musical My Fair Lady. It was then-Walt Disney Studios president Jeffrey Katzenberg who insisted the film should be re-written as a modern-day fairy tale with qualities of a love story, as opposed to being the dark drama it was originally developed as. It was pitched to Touchstone Pictures and re-written as a romantic comedy. The original script was titled $3,000, however this title was changed because Disney executives thought it sounded like a title for a science fiction film. It also has unconfirmed references to That Touch of Mink, starring Doris Day and Cary Grant.
The film is one of the two movies that triggered the resurrection of the romantic comedy genre in Hollywood, the other being When Harry Met Sally. After completion of the 1960s Doris Day/Rock Hudson romantic comedies, the genre fell out of favor. Following its success, Roberts became the romantic comedy queen of the 1990s.
Casting of the film was a rather lengthy process. Marshall had initially considered Christopher Reeve, Daniel Day-Lewis, and Denzel Washington for the role of Lewis, and Al Pacino turned it down. Pacino went as far as doing a casting reading with Roberts before rejecting the part. Gere agreed to the project. Reportedly, Gere started off much more active in his role, but Garry Marshall took him aside and said "No, no, no. Richard. In this movie, one of you moves and one of you does not. Guess which one you are?" Julia Roberts was not the first choice for the role of Vivian, and was not wanted by Disney. Many other actresses were considered at the time. Marshall originally envisioned Karen Allen for the role. When she declined, it went to many better-known actresses of the time including Molly Ringwald, who turned it down because she felt uncomfortable with the content of the script, and did not like the idea of playing a sex worker. Winona Ryder auditioned, but was turned down because Marshall felt she was "too young". Jennifer Connelly was also dismissed for the same reason.
Meg Ryan, who was a top choice of Marshall's, turned it down. According to a note written by Marshall, Mary Steenburgen was the first choice to play Vivian. Diane Lane came very close to being cast as Vivian (which had a much darker script at the time), but due to scheduling was unable to take the role. They had gone as far as costume fittings with Lane. Michelle Pfeiffer turned the role down as well, because she did not like the "tone" of the script. Daryl Hannah was also considered, but turned the role down because she believed it was "degrading to women". Valeria Golino also turned it down as she did not think the movie could work with her thick Italian accent. Jennifer Jason Leigh had auditioned for the part. When all the other actresses turned down the role, 21-year-old Julia Roberts, who was relatively unknown at the time, with the exception of the sleeper hit Mystic Pizza (1988), and later her Oscar-nominated performance in Steel Magnolias (1989), won the role of Vivian. Her performance made her a star.
The film's budget was substantial, at $14 million, therefore producers could shoot in many locations. Most filming took place in Los Angeles, California, specifically in Beverly Hills, and inside soundstages at Walt Disney Studios in Burbank. The escargot restaurant "The Voltaire" was shot at the restaurant "Rex", now called "Cicada". Filming of the Beverly Wilshire Hotel lobby was shot at the Ambassador Hotel in Los Angeles. Filming commenced on July 24, 1989, but was immediately plagued by countless problems, including issues with space and time. This included Ferrari and Porsche declining the product placement opportunity of the car Edward drove, because the manufacturers did not want to be associated with soliciting sex workers. Lotus Cars saw the placement value with such a major feature film. This company supplied a Silver 1989.5 Esprit SE (which was later sold). This gamble paid off as the sales of the Lotus Esprit tripled during 1990-91.
Shooting was a generally pleasurable and easy-going experience for those involved, as the film's budget was broad and the shooting schedule was not tight. While shooting the scene where Vivian is lying down on the floor of Edward's penthouse, watching reruns of I Love Lucy, in order to achieve genuine laughter, Garry Marshall had to tickle her feet (out of camera range) to get her to laugh so hysterically, which is featured in the film. Likewise the scene in which Gere playfully snaps the lid of a jewelry case on her fingers was improvised by him, and her surprised laugh was genuine, while the dress worn by her in that scene has been included in a list of the most unforgettable dresses of all time.
During the scene in which Roberts sings along to Prince in the bathtub sliding down and dunking her head under the bubbles, she came up and opened her eyes and saw that everyone had left except the cameraman, who got the shot. In addition, during the love-making scene between her and Gere, she got so nervous that a vein visibly popped out on her forehead. She also developed a case of hives, and calamine lotion was used to clear them until shooting could resume. The filming was completed on October 18.