What account is it asking to be logged into?
Just what are you doing?
iCloud?
iTunes/App Store?
Try
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Then try again
Reset the password:
How do I change or recover a forgotten Apple ID Password?
If you've forgotten your Apple ID Password or want to change it, go to My Apple ID and follow the instructions. SeeChanging your Apple ID password if you'd like more information.
- Backup and then restore from backup. See:
iOS: Back up and restore your iOS device with iCloud or iTunes
- Restore to factory settings/new iOS device.