Firstly, we need to keep in mind that our God is a good God. Bring that truth to soak in deeply in your heart. In circumstance that you may not understand it as 'good', God is still good and His love for you never change. Then why does God seem to close the used-to-be opened door before? There are various possibilities for this. Sometimes we are so in comfort zone when we are in good condition until we do not realize how important it is until it is gone. We may be grateful for His blessings yet true thankfulness is born when there is nothing to thank for. Hence, God is asking your attention more. Some closed door will mean that God does not intend you to go to certain direction. Yet it could either mean that it is not the time yet to go through the door. In both cases, God's deepest purpose is for us to pray more. As the true thankfulness is born when there is nothing to thank for, so does sincere prayer is born as we cry out desperately to God. The darkest hour comes as we pray fervently, yet hear nothing in return. Silence. Will we keep trusting in God through that moment?
"See, I have placed before you an open door that no one can shut" - Revelation 3:8a
What He opens no one can shut, and what he shuts no one can open. If you know that it is God's will but the door is being closed at the moment, keep going. Keep waiting, keep persevering in praying and growing. Surrender what is the most dear to your heart to Him. But if you know that it isn't God's will and the door is being opened, do not go there. Not every opened door is God's opportunity for you. You will know what to do as you grow in intimacy with Him. He reveals his plans and thoughts to those who love Him and seek Him with all their hearts. If He prunes you, it means that He wants you to be fruitful in love and deeds. Do not ask, "Why God?" but ask instead, "What do you want me to learn from this?"
The darkest moment is the biggest turning point in your life.