When I attach my Galaxy S to my home wifi network it will stay connected for about 1-2 minutes. After this the wifi icon will be enabled, however no connection seems to actually be there.
I've tried a few wifi re-enablers on the marketplace but they haven't been successful.
I would start at the router and look there first. Do a reboot of the router and see if it still happens. if it does, there should be logging in the admin of the router that you can turn on (if its not already) and maybe you can see something causing the drop.
Try getting Wifi Analyzer from the android market (free) to check if your router is on the same channel as other networks around you. try to put your router on the "clearest" channel.
go to Settings -> Wireless and network -> Wi-Fi settings, then press the "menu" key at the bottom of your phone. Click on "Advanced", then on "Wi-Fi sleep policy", it should have the option of "When screen turns off" but change it to "Never" if you don't want it to drop your Wi-Fi and use your phone service provider's data network when your screen turns off.
That happened to me because the network was handling b g and n bands, if you set only n in the router, the problem is solve.
Is it dropping while you're actively using it? Then is probably a router problem, or possibly a defective phone. Try on another network.
Otherwise, try using RyanZa's One Click Lag Fix. You don't need to actually use the lagfix, just open the app and change the WiFi Timeout value to something higher.
If you have JPY firmware then it might be causing problems. Try JPU/JPX
And try also other modem.
Hopefully it will help!