Same issue here. I went back the Apple Store with the issue. Of course it was working fine with the Apple Store's wi-fi. They performed a restore and reloaded iOS 6 on it. It was working fine there with their wi-fi, but as soon as I got home and connected to my network, I was having the same issues again. It would connect, but it was slow, choppy, and sporadic or fail altogether.
My old iPhone 4 (and 3GS) connects to it without any issues.
I have a first generation Apple Airport Extreme N wireless router. I had already tried resetting it without resolving the problem, but I decided to change the security from "WPA/WPA 2 Personal" to "WPA 2 Personal" and it seems to have made an improvement.
It may be too early to say it is resolved for me, I will see how it goes. --- Well, playing with it for a bit while typing this message, it still seems a little choppy, though better than before.
Now the Apple Store wi-fi was open... no security. I will try turning off security and see if that resolves the issue on the iPhone 5, but no security cannot be the answer.