If you get an unknown error when restoring an iPad to factory settings and you know your iTunes is up to date and you don't have anything weird blocked on your firewall or web filter, it's likely the cable you're using. Apple has a full list of troubleshooting steps.
Just keep in mind that you may try several third-party cables that work fine in other instances or with other iPads, but if you have a particularly finicky iPad that refuses to be restored, make sure you use an official cable from Apple.
We had an iPad stuck in Connect to iTunes mode, and it refused to restore on multiple known-working (in other contexts) USB cables. Tried a download through iTunes. Tried a direct .ipsw download. The download was fine. It was just the restore that was finicky... until we tried an official Apple USB cable.