This is insanity. 3 years, and there's still no proper solution to this, doubtlessly because it forces people to upgrade hardware that would otherwise be perfectly functional. Apple creating extra waste. Nice work guys.
I am having this problem now too (despite having moved to 2-factor ages ago). On my 3rd Gen ATV it started refusing to log-in to home sharing. Because I use 1password my Apple ID pw is a 32 digit random string, and I realized that there might have been a problem with what dash the screen on the ATV was using (seemed dubious but worth trying), so I reset my password to only letters/numbers.
Still couldn't get it to log-in, so logged out of apple everywhere (iPhone, PC, ATV) and tried again. No problems logging in on the phone or PC, but the ATV still wouldn't go. So I restored the ATV and downloaded the newest software. Still wouldn't log-in. Discovered this "hack" of adding the verification code from my phone, carefully inputted the pw then generated a new code and added it then clicked submit, but still nothing. Very strangely, my ATV logs into iTunes just using my ID, pw, and then 2-factor code that it asks for (and my phone automatically shows). So without using the password hack, I can log the ATV into iTunes, but nothing else (with just the normal pw or with the fresh verification code added to the end). I thought I would disable 2-factor, but Apple won't let you do that, which is also pretty troubling.
People claim that the 2nd and 3rd gen ATVs can't handle 2-factor authentication, but they obviously are somewhat able to, as it works perfectly logging in to iTunes. Just not home sharing or iCloud for some strange reason.
I am at a complete loss here. Everything I find when I search this either explains generating a code on your phone and adding it to the password, or else clarifying that when doing that you need to generate a fresh code to add once you've inputted the pw but before you click submit, so that it hasn't expired. But none of that is helping. I'm beginning to think the obvious choice here is to replace the ATV, but obviously it won't be with an Apple product, as I couldn't care less about the actual Apple software; it's really just an easy way to watch Netflix/Prime/YouTube on my not-smart TV.
Any other suggestions?