This carol, with anonymous lyrics, is known as the "Coventry Carol". It was originally performed in Coventry in the English midlands in the 16th century as part of a distinctly secular sounding mystery play called the "Pageant of the Shearmen and Tailors". In fact, this probably takes its name from the relevant guilds, and the play itself concentrates on the darkest aspect of the Nativity story; Herod's slaughter of the innocents - in the context of the play it is sung by the murdered children's mothers. The music is generally accredited to Thomas Mawdyke, whom some evidence identifies as a local tailor (which would make sense).

The carol fell out of favour during and after the Reformation, but the text and music survived, and were republished in the 19th century by an antiquarian named Thomas Sharp. It was not until the mid 20th century and a moving radio broadcast of it after the bombing of Coventry in WW2 that it achieved the popularity it enjoys today, with many artists, both popular and classical, having recorded it.

It also incorporates an interesting musical device known as the "Picardy Third" which involves a major chord appearing at the end of a piece of music in a minor key, giving the impression of resolution.

More Info: en.wikipedia.org