The same God that opens doors will close doors. Maybe you prayed and didn't get the job you really wanted or a relationship didn't work out. It's easy to allow rejection to lead to discouragement and think that God is not working in your life. But God sees the bigger picture for your life. He knows where every road is leading and where the dead ends are.
Proverbs 20:24 says, "A person's steps are directed by the Lord. How then can anyone understand their own way?"
When you realize you are in the palm of God's hand and that nothing happens without His divine purpose, then you will begin to see and realize that the closed doors are just as important as the open doors.