As I posted in alt.obituaries on 11/3/2005, 5/11/2008 and 11/23/2008
(as various threads about "Night Gallery" and/or about Jerry Wallace's
demise dictated):
The song was composed for the episode* (lyrics dashed off in three
minutes by script co-writer Gerald Sanford; music by series music
supervisor Hal Mooney), and the day after the show aired radio stations
were swamped with requests for the song. Universal was stunned by this
unexpected response but quickly had Jerry Wallace come back in and
re-record a full-length version for commercial release on its Decca
Records label, and while the single charted 9 weeks on the Billboard Hot
100, peaking at #38 for two weeks, it also ran 17 weeks on Billboard's
country singles chart, 3 of them at #1.
[* "The Tune in Dan's Cafe", teleplay by Gerald Sanford & Garrie
Bateson, story by Shamus Frazer, directed by David Rawlins]