Lewis Carroll wrote this poem after seeing the painting The Finding of the Saviour in the Temple by William Holman Hunt (shown below).