It sounds like you have enabled two factor authentication security on your account which is totally confusing iOS5 since iOS5 predated 2 Factor.
Two-factor authentication for Apple ID - https://support.apple.com/HT204915 - "Two-factor authentication is an extra layer of security for your Apple ID designed to ensure that you're the only person who can access your account, even if someone knows your password." Uses a "trusted" device to receive a passcode to verify adding a device. Article also has a FAQ section and general information on how to set up and edit information.
Jan 2017 Community Specialist sterling_r post: https://discussions.apple.com/message/31213055#message31213055 - "On older software, if you are not given a box to enter the verification code, you can simply put it immediately after your password. Note that this would not require a space."
You may have to contact Apple to resolve this but they will probably just tell you iOS5 devices are no longer supported and to get something newer. Sorry.
Contact - Official Apple Support --> https://support.apple.com/contact
or:
Contact Apple for support and service --> "See a list of Apple phone numbers around the world." - https://support.apple.com/HT201232