The plot of Hello, Dolly! originated in the 1835 English play A Day Well Spent by John Oxenford, which Johann Nestroy adapted into the farce Einen Jux will er sich machen (He Will Go on a Spree or He'll Have Himself a Good Time). Thornton Wilder adapted Nestroy's play into his 1938 farcical play The Merchant of Yonkers. That play was a flop, so he revised it and retitled it as The Matchmaker in 1955, expanding the role of Dolly (played by Ruth Gordon). The Matchmaker became a hit and was much revived and made into a 1958 film starring Shirley Booth. However, the 1891 musical A Trip to Chinatown also features a meddlesome widow who strives to bring romance to several couples and to herself in a big city restaurant.
The role of Dolly Gallagher Levi was originally written for Ethel Merman but she turned it down, as did Mary Martin—although both eventually played it. Merrick then auditioned Nancy Walker, but he hired Carol Channing who created her signature role in Dolly. Director Gower Champion was not the producer's first choice, but Hal Prince and others turned it down, among them Jerome Robbins and Joe Layton.
Hello, Dolly! had rocky tryouts in Detroit, Michigan and Washington, D.C. After receiving the reviews, the creators made major changes to the script and score, including the addition of the song "Before the Parade Passes By". The show was originally entitled Dolly, A Damned Exasperating Woman, then Call on Dolly, but Merrick changed it upon hearing Louis Armstrong's version of "Hello, Dolly". The show became one of the most iconic Broadway shows of the latter half of the 1960s, running for 2,844 performances, and was the longest-running musical in Broadway history for a time.