"What Child Is This?" was written by William Chatterton Dix in 1865. At the age of 29, William was struck with a sudden near-fatal illness and confined to bedrest for several months, during which he went into a deep depression. Yet out of his near-death experience, Dix wrote many hymns, including "What Child Is This?" It was later set to the traditional English tune "Greensleeves."
https://music.justinreeve.com/what-child-is-this/