Can't erase my phone I can't erase all content and settings on my iPhone 6s+.

When I enter my passcode, restrictions PIN, and iCloud password it displays an error telling me that verification failed, there was an error connecting to iCloud. 

What's causing this and how can I fix it?
Have you tried putting the phone in recovery mode and then unlocking the iCloud restriction afterwards? Hold down the sleep/wake and Home button until the iPhone goes into recovery mode and then erase it by connecting it to iTunes via a Lightning cable. Once the phone is erased it will require you to login to your iCloud account to unlock it.