1) This may sound backwards, but try from beginning WITHOUT iTunes running. Launch iTunes AFTER code is displayed. There's only a teeny chance that this will resolve it - but at least it's a quicky. Heck it worked once for me on ATV1 - YMMV
2. Try turning OFF Home Sharing (in iTunes, quit then Relaunch) then turn it back on again. While you're at it, do the same with your ATV. (there's a restart option (I think under troubleshooting).
3. Another thing to check: are you using your iTunes Store account (which can actually be different from your Apple ID)
If that doesn't work, go back to square one, reset it, then follow setup instructions from scratch, and follow them like your life depended on it. The first few times I setup an ATV all worked just fine, then I bought a new one, tried to wing-it (since it all seemed so simple and obvious in the past) only to discover I'd missed something obvious (or had done it in the wrong order.)
It sounds like a new ATV, why sweat it - if it is, I think you can call Apple for free - their support folks are usually excellent - and they've heard it all. (sure beats reading thru numerous posts or frying your head)
Hope someone else will pipe in if none of this works. Good Luck.