“山穷水尽疑无路柳暗花明又一村”

“Where the hills and streams end and there seems to be no road ahead, amidst shady willows and blooming flowers, another village appears.”

In other words, when all seems lost, there is hope.