The first line indicates the focus of the entire text: God's ways may well be mysterious to us, but God does act! He "works his sovereign will" (st. 2), and someday "he will make it plain" (st. 5). In the meantime, even in periods of profound doubt and despair, we may trust God's wisdom.
Psalter Hymnal Handbook
This beloved hymn has been the source of encouragement to many believers in their times of trial and pain, for it enables them to express in song what they have learned from the confessions. First, God will always be with his people. Heidelberg Catechism, Lord’s Day 9, Question and Answer 26 professes that God will “turn to my good whatever adversity he sends upon me in this sad world.”
Secondly, nothing happens outside of God’s will. Lord’s Day 10, Question and Answer 27 professes that “all things, in fact, come to us not by chance but by his fatherly hand.” Belgic Confession, Article 13 teaches that “this doctrine (of God’s Providence) gives us unspeakable comfort since it teaches us that nothing happens to us by chance but only by the arrangement of our gracious heavenly father.”
Finally, nothing can separate God’s people from his gracious love. Heidelberg Catechism, Lord’s Day 10, Question and Answer 28 professes that we can have “good confidence in our faithful God and Father that nothing in creation will separate us from his love.”