The legendary singer turned a film’s emotional centerpiece into one of the biggest songs of her solo career.