I have encountered similar problem - I could connect to my wifi but cant access internet - The problem was due to overlapping of IP address and DNS - Just go to setting option- > wifi connection > select your wifi network > there is ">" infront of wifi network , click on it >, just see whether your IP adrress and DNS is same under DHRCP tab, if yes got to static option - copy your IP address from DHRCP and put your DNS as 184.108.40.206 its a universal DNS , work on all networks - try this your and phone will work fine
Well done on solving your problem.
But with all due to respect to you and the others that come here and say "the following solved my problem" the sad fact is (and it IS fact) that there is an issue with iOS 6.1.3 that has broken WiFi for many people. Some of those many people have managed to get things working again - that does NOT mean that the problem doesn't exist. It DOES.
I am one of the lucky ones whose wifi worked again by reassigning channels on the routers. Others are finding different workarounds. But that is what they are - there is still an inherent software related issue in going from 6.1.2 to 6.1.3 that causes many people issues with their WiFi.
I am also aware of those Apple die-hard fans who find it hard to believe that this is true. Get a grip and think about how irrational your arguments are in the face of the empirical evidence that is the 6.1.3 'upgrade'.