This error may also come up in iTunes as error 1013
There are several ways to get out of this loop and sometimes some work better than others. My suggestion would be to start off by downloading Tiny Umbrella from here. You can then use the "kick device out of recovery mode" or "exit recovery" to hopefully get your device out of the loop.
If this does not work, try reading this post as this also seems to be a good method and has worked for me in the past.
If you require more information, please leave a message below.