The song is a prayer of commitment of trust to God. Holding on to Him even the situation isn't palatable.
Sometimes, we fail to trust God in situations that only Him can help us out of, we loose our faith and begin to look for other options. This song encourages us to hold on to God's promises.
It's also a prayer for God's Grace to be made available to hold on to God... Asking that God should hold on to us because we need him hold on to us else we stray and become desolate....