Isaiah 45:7 "I form the light, and create darkness: I made peace, and create evil: I the Lord do all these things."
This verse has been badly translated from the Hebrew text. Lets take a close look at two words here, the words "create", and "evil". The verb "create" or "bara" in the Hebrew requires the rendering "to bring about". This word has to be determined in the context of it's use.
The word "evil" is never rendered "sin", but "calamity". God brings calamity into our lives as the inevitable consequences of the sin that is committed. God is saying that if you chose to bring sin in your life, you can count on the calamity that will follow. God has not created the sin, or evil, but God has created the individuals that have turned to evil. Then when you get out of line, God provides the distress within your life to show you that you are out of line, and by that calamity you know it is time to repent and get back into line.
If you are a child of God, you will pick up on those times when you are out of the will of God, and see the distress for what it is and thank Him for it. You will get back to where you should be, and then God will straighten you path and break down those bars and gates that are in your way. However it is all up to you.