My 5s is driving me crazy. I can not open Apple of iCloud because it always rejects my password. I'll go to Apple or icloud via my computer and change it, and then try opening it a few times. Always works OK. BUT, then I try to open it with the phone - and it is rejected for incorrect password.
Usually two things cause this (or more precisely, one of the two):
- corrupt keychain items or corrupt software install
- wrong date/time on the iOS device
The date/time is far easier to fix, so ensure the clock is accurate within a minute of reality / the PC that's working.
Corruption is harder, so try powering off the device and back on, then try a backup and reset all settings. If that doesn't work, then a restore is next. Once you have a working sign in, you can erase again and then restore the backup or just reload the things you need and forget the backup eventually.