Psalm 102:1-2: "1 Hear my prayer, O LORD; let my cry come to you! 2 Do not hide your face from me in the day of my distress! Incline your ear to me; answer me speedily in the day when I call!"
Psalm 25:15-22: "15 My eyes are ever toward the LORD, for he will pluck my feet out of the net.
"16 Turn to me and be gracious to me, for I am lonely and afflicted. 17 The troubles of my heart are enlarged; bring me out of my distresses. 18 Consider my affliction and my trouble, and forgive all my sins.
"19 Consider how many are my foes, and with what violent hatred they hate me. 20 Oh, guard my soul, and deliver me! Let me not be put to shame, for I take refuge in you. 21 May integrity and uprightness preserve me, for I wait for you.
"22 Redeem Israel, O God, out of all his troubles."
Romans 9:17-19: "17 For the Scripture says to Pharaoh, 'For this very purpose I have raised you up, that I might show my power in you, and that my name might be proclaimed in all the earth.' 18 So then he has mercy on whomever he wills, and he hardens whomever he wills.
"19 You will say to me then, 'Why does he still find fault? For who can resist his will?'"
Micah 7:7: "But as for me, I will look to the LORD; I will wait for the God of my salvation; my God will hear me."
+++
The text is public domain:
When in the hour of deepest needWe know not where to look for aid;When days and nights of anxious thoughtNo help or counsel yet have brought,
Then is our comfort this aloneThat we may meet before Your throne;To You, O faithful God, we cryFor rescue in our misery.
For You have promised, Lord, to heedYour children's cries in time of needThrough Him whose name alone is great,Our Savior and our advocate.
And so we come, O God, todayAnd all our woes before You lay;For sorely tried, cast down, we stand,Perplexed by fears on ev'ry hand.
O from our sins, Lord, turn Your face;Absolve us through Your boundless grace.Be with us in our anguish still;Free us at last from ev'ry ill.
So we with all our hearts each dayTo You our glad thanksgiving pay,Then walk obedient to Your Word,And now and ever praise You, Lord.
+++
The hymnal does cite Romans 9:17-19, but because it's oddly excerpted and doesn't address the same themes as the hymn or the other citations, I suspect this is not actually the passage that was intended.
The hymn draws from the other three texts in a more general way, but there are a few instances where clearer connections can be made. Micah 7:7 is the basis for the first three verses, specifically for looking to God for aid and knowing that He will hear. The lines "To You, O faithful God, we cry / For rescue in our misery" seem to incorporate Psalm 102:1-2 too.
The passage from Psalm 25 seems to appear in the fourth verse, which - like the Biblical text - describes the multitude of the narrator's afflictions.