I know this isn't helpful (yet), but just to say that we have exactly the same problem. Got the Samsung Galaxy Tab 2 10.1 for Christmas [(GT-P5110) Android version 4.0.4]
Set up fine and wireless worked fine. Then then went on the family tour, where it worked with all of their various wireless networks fine as well.
Then got home and, though it would connect with our wireless, it would not connect with the internet, whereas all our other devices (laptops, iphones etc) had no problems.
What we tried:
Turn off router and back on (usually fixes things!) - nope
Forget network on Tab and reconnect - nope
Turn off both tab and router and then back on - nope
Reset the router itself - nope
The nub of the problem seemed to be that the tab had no ip address assigned to it. If you went to connect to wireless - advanced; there would be no IP address listed, and this seemed to be the problem, as though the tab thought it was connected to the wireless (and I think it was, as the bars showed in the bottom left and the arrows flashed to indicate data going in and out), it simply wouldn't connect to the internet, apps etc etc.
Apparently, this has been an issue with the original tab as well, related to the way that the Tab remembers the original DHCP IP address given to it and then refuses to accept another one if you turn off your router for any reason (which we have to do from time to time when it throws a hissy fit).
In the end, we had to reset the tab to factory settings, whereupon the wifi worked again. But I'm dreading the next time it drops out as I'm not wanting to restore my tab every few days!
Will update if we get anywhere.