I had the very same problem with the Galaxy Tab (Linksys wrt54g router). This is what helped me:
1) Set a static IP address on router (assign an IP to your phone/tab mac address e.g. 128.128.1.110)
2) Download Wifi Static (free) from Android Marketplace
3) Use your computer / mobile device / router info page via browser to get the following (on Windows prompt, type ipconfig /all):
A) IP address: this is the address you set on the router as static
B) Gateway: this is your router as gateway, usually your router IP (eg 128.128.1.1 for me)
C) Netmask: set on the router, usually 255.255.255.0
D) DNS1, DNS2: domain name server values, your provider assigns them, router and ipconfig lists these values
E) WIFI network SSID
F) Your router MAC address (called BSSID)
4) Start Wifi Static and enter all the information above. When you give all this, at the bottom of the screen you have "APs that use the above info" (Access Points). Tap it, usually it offers the WIFI network SSID (name) immediately, if not type it in. Same with BSSID (this is the router MAC address)
5) dont forget the save the info (menu: add). quit & go back to wifi android screen
6) select your (on Galaxy, probably right now says disabled) wifi network. Click to forget, then re-enter the password
7) a transparent box will appear to signify that this connection is going to use the static settings. if this does not appear, you got something wrong
8) connected
hopefully.
Took me 2 hrs to figure this out, no problem since then. Gone crazy with refreshing router etc etc etc. Good luck!
1) Set a static IP address on router (assign an IP to your phone/tab mac address e.g. 128.128.1.110)
2) Download Wifi Static (free) from Android Marketplace
3) Use your computer / mobile device / router info page via browser to get the following (on Windows prompt, type ipconfig /all):
A) IP address: this is the address you set on the router as static
B) Gateway: this is your router as gateway, usually your router IP (eg 128.128.1.1 for me)
C) Netmask: set on the router, usually 255.255.255.0
D) DNS1, DNS2: domain name server values, your provider assigns them, router and ipconfig lists these values
E) WIFI network SSID
F) Your router MAC address (called BSSID)
4) Start Wifi Static and enter all the information above. When you give all this, at the bottom of the screen you have "APs that use the above info" (Access Points). Tap it, usually it offers the WIFI network SSID (name) immediately, if not type it in. Same with BSSID (this is the router MAC address)
5) dont forget the save the info (menu: add). quit & go back to wifi android screen
6) select your (on Galaxy, probably right now says disabled) wifi network. Click to forget, then re-enter the password
7) a transparent box will appear to signify that this connection is going to use the static settings. if this does not appear, you got something wrong
8) connected
hopefully.Took me 2 hrs to figure this out, no problem since then. Gone crazy with refreshing router etc etc etc. Good luck!

I think this is the reason the Galaxy Tab Wifi-Only version never came out. Because the wifi only works intermittently. Some days the wifi will work on my router and some days it won't. It's totally random and totally annoying.