I had the same problem this is what I did to fix it:
Go into Settings > Wireless & Network > WiFi > Advanced > Check Keep Wifi On During Sleep
I hope this will help you as well :)
I have my own Galaxy S3. It was working nice. But after sometime it used to create some problem in wifi connection, Was not working. I had checked my router setting also but the problem was in handset. But now I am glad to say that i got a solution which worked great for me for my Galaxy S3 and I thought that I should also contribute from my side to help people Who having the same problem I had. Hope The given procedure will work.