Isaiah 40:11: "He will tend his flock like a shepherd; he will gather the lambs in his arms; he will carry them in his bosom, and gently lead those that are with young."
John 10:11: "'I am the good shepherd. The good shepherd lays down his life for the sheep.'"
+++
The text is public domain:
1 Shepherd of tender youth,Guiding in love and truthThrough devious ways;Christ, our triumphant king,We come Your name to singAnd here our children bringTo join Your praise.2 You are the holy Lord,O all-subduing Word,Healer of strife.Yourself You did abaseThat from sin's deep disgraceYou so might save our raceAnd give us life.3 You are the great High Priest;You have prepared the feastOf holy love;And in our mortal painNone calls on You in vain;Our plea do not disdain;Help from above.4 O ever be our guide,Our shepherd, and our pride,Our staff and song.Jesus, O Christ of God,By Your enduring WordLead us where You have trod;Make our faith strong.5 So now, and till we die,Sound we Your praises highAnd joyful sing:Infants and all the throng,Who to the Church belong,Unite to swell the songTo Christ, our king!
+++
Both cited passages inform the entire hymn, particularly parts of the first and fourth verses. The good shepherd's "lay[ing] down his life for the sheep" from John 10:11 is also referred to in the second verse: "Yourself You did abase / That from sin's deep disgrace / You so might save our race."
+++
The third verse ("You are the great High Priest...") seems to be drawn from Hebrews 4:14-16: "14 Since then we have a great high priest who has passed through the heavens, Jesus, the Son of God, let us hold fast our confession. 15 For we do not have a high priest who is unable to sympathize with our weaknesses, but one who in every respect has been tempted as we are, yet without sin. 16 Let us then with confidence draw near to the throne of grace, that we may receive mercy and find grace to help in time of need."
Parts of the fourth verse are drawn from Psalm 23, the title "Our shepherd" from verse 1 ("The LORD is my shepherd"), "Our staff" from verse 4 ("your rod and your staff, they comfort me"), and the call to "Lead us where You have trod" from verses 2-3 ("He leads me beside still waters. ... He leads me in paths of righteousness for his name's sake.").