The expression comes from the Bible, the Letter of St. Paul to the Roman Christians, chapter 4, verse 18. Here are some of the ways the expression could be translated. Each of the following has been altered slightly, but if you are interested in the exact wording, look here.
Even when there is no logical reason to hope, hope anyway.
Beyond hope, but maintaining faith in hope.
Past hope, but still hoping.
Against hope, but believing in hope.
Believing in hope, even when there's no reason to hope.
When there's nothing left to hope for, still hope.
Hope believed against hope.
Against hope, believe in hope.
Continue hoping even when there's no hope.
Against all hope, in hope believe.
Believe hopefully when utterly hopeless.
Against hope, in hope still believe.
And here are a few of my ways of expressing the thought:
Even when you're up against a hopeless situation, choose to hope anyway. (It beats giving up!)
Be hopeful even when things seem hopeless.
When a situation seems hopeless, hope anyway.
In context (read Romans 4:17-19) Romans 4:18 speaks of Abraham, the father of the Jews, who despite being close to 100 years old, and despite being married to Sarah who was well past childbearing years at the age of 90, chose to believe that God could do what he had promised more than two decades earlier to do; namely, to give him and Sarah a child of their own, through their own bodies.
For the complete story of Abraham's and Sarah's miracle child (viz., Isaac), read Genesis chapters 15, 16, and 18.