Luke 2:41-52: "41 Now his parents went to Jerusalem every year at the Feast of the Passover. 42 And when he was twelve years old, they went up according to custom. 43 And when the feast was ended, as they were returning, the boy Jesus stayed behind in Jerusalem. His parents did not know it, 44 but supposing him to be in the group they went a day's journey, but then they began to search for him among their relatives and acquaintances, 45 and when they did not find him, they returned to Jerusalem, searching for him. 46 After three days they found him in the temple, sitting among the teachers, listening to them and asking them questions. 47 And all who heard him were amazed at his understanding and his answers. 48 And when his parents saw him, they were astonished. And his mother said to him, 'Son, why have you treated us so? Behold, your father and I have been searching for you in great distress.' 49 And he said to them, 'Why were you looking for me? Did you not know that I must be in my Father's house?' 50 And they did not understand the saying that he spoke to them. 51 And he went down with them and came to Nazareth and was submissive to them. And his mother treasured up all these things in her heart.
"52 And Jesus increased in wisdom and in stature and in favor with God and man."
1 Timothy 3:16: "Great indeed, we confess, is the mystery of godliness: He was manifested in the flesh, vindicated by the Spirit, seen by angels, proclaimed among the nations, believed on in the world, taken up in glory."
1 Corinthians 2:7-10: "7 But we impart a secret and hidden wisdom of God, which God decreed before the ages for our glory. 8 None of the rulers of this age understood this, for if they had, they would not have crucified the Lord of glory. 9 But, as it is written, 'What no eye has seen, nor ear heard, nor the heart of man imagined, what God has prepared for those who love him' - 10 these things God has revealed to us through the Spirit. For the Spirit searches everything, even the depths of God."
Ephesians 1:9: "...making known to us the mystery of his will, according to his purpose, which he set forth in Christ..."
+++
The text is public domain:
Within the Father's house
The Son has found His home,
And to His temple suddenly
The Lord of life has come.
The doctors of the Law
Gaze on the wondrous child
And marvel at His gracious words
Of wisdom undefiled.
Yet not to them is giv'n
The mighty truth to know,
To lift the earthly veil that hides
Incarnate God below.
The secret of the Lord
Escapes each human eye,
And faithful pond'ring hearts await
The full epiphany.
Lord, visit Thou our souls
And teach us by Thy grace
Each dim revealing of Thyself
With loving awe to trace
Till we behold Thy face
And know as we are known
Thee, Father, Son, and Holy Ghost,
Coequal Three in One.
+++
The text from Luke 2 is the main source for the hymn, the first three verses in particular. The third verse also seems to draw from the cited verses in 1 Timothy and 1 Corinthians. "None of the rulers of this age understood this" from the 1 Corinthians texts seems to be re-worked into "Yet not to them is giv'n / The mighty truth to know." The "the mystery of godliness" and specifically that "He was manifested in the flesh" from 1 Timothy seems to be what the second half of that verse describes: "the earthly veil that hides / Incarnate God below."
The text from 1 Corinthians (particularly verses 7 and 9) is also in the later verses. The "secret and hidden wisdom of God" from 1 Corinthians 7 is at the beginning of verse four of the hymn ("The secret of the Lord"). 1 Corinthians 9 explains that we have just a small idea of "what God has prepared for those who love him." In the hymn, this is expressed in the entirety of the fourth verse and in a few lines in the fifth and sixth. This "dim revealing of Thyself" also seems to be how "making known to us the mystery of his will, according to his purpose" from the Ephesians verse is incorporated.
The text from 1 Corinthians (particularly verses 7 and 9) is also in the later verses. The "secret and hidden wisdom of God" from 1 Corinthians 7 is at the beginning of verse four of the hymn ("The secret of the Lord"). 1 Corinthians 9 explains that we have just a small idea of "what God has prepared for those who love him." In the hymn, this is expressed in the entirety of the fourth verse and in a few lines in the fifth and sixth. This "dim revealing of Thyself" also seems to be how "making known to us the mystery of his will, according to his purpose" from the Ephesians verse is incorporated.
+++
Unrelated to the Biblical sources, there's an interesting poetic feature in the fourth verse: the imperfect rhyme between "eye" and "epiphany" illustrates that we see but "dim revealing"s and not "the full epiphany" that a perfect rhyme would symbolize.