candidate: The song first appeared in a scene in " Meet Me in St. Louis " , in which a family is distraught by the father 's plans to move to New York City for a job promotion , leaving behind their beloved home in St. Louis , Missouri , just before the long - anticipated 1904 World 's Fair begins .