You can try a few different things:
- Double check you internet connection.
- Try a new USB cord.
- Try a different USB port on your computer.
- Try a different computer all together.
- Reboot your router and computer.
- Check you firewall settings, firewall could mark the iTunes as an insecure/suspicious connection. This will then block the internet connection.
- Try to disable your anti virus software
- Update iTunes
Try these things to see if this will get your device out of recovery mode. You do not have to try in that order. These are just most things that cause this error.