You're likely thinking of The Jolson Story (1946) (Larry Parks as Al Jolson). Robert Cummings does not play an angel—he plays Steve Martin, a songwriter. The angel ("The Angel") is played by William Demarest, who visits young Jolson (Scotty Beckett) during pneumonia; the boy's will to live convinces the angel to spare him.
Common trope: angel taking dying child to heaven.