The 2012/2013 model Apple TV (3rd generation) [A1427 or A1469] may need a special procedure (see below) to sign in for iTunes Store related services. This model cannot connect anymore for iCloud services. iCloud has changed, but the old system software hasn’t changed with it. See: discussions.apple.com/thread/255664587.
__________________________
If you have an Apple TV (2nd or 3rd generation) and two-factor authentication for your Apple Account, then you may be asked to type your password followed by the six-digit verification code directly into the password field. Additionally, there is a time limit, after which the code becomes invalid.
Try this: First enter the characters of your password (do not submit yet), then manually request a new verification code, then append that code to the password (no spaces or other separating characters), and then submit. That should help you get passed the time limit.