Try setting your router to G only. Then turn OFF any security. Also make sure your SSID is NOT hidden. Once you've done that, unplug the router's power. Then unplug your cable modem's power. Wait about 30 seconds and then plug in the modem and wait for it to boot up. Then, once it's up and running, plug in the router's power and wait for it to completely boot up.
If you don't have it, I recommend grabbing Wifi Analyzer from the Market and installing it.
Then, turn on your phone's wifi, go into the Wireless settings and "forget" any networks you may have previously set up. Then, when they are all blank, go into Wifi Analyzer and see if it even sees your router's wireless (it should show the SSID, signal strength, etc.) If so, go back into the wireless settings and try to connect to your network. It SHOULD work now.
Assuming you DID connect, go into your router and change to N-only (2.4Ghz since that's what the phone uses, not 5Ghz), don't hide the SSID, and turn off security. Note - I recommend naming the G radio something like AirportloungeG and the N radio AirportloungeN so you can distinguish between them. If your router is simultaneous dual band, I still recommend trying the two radios separately and one at a time before enabling both at the same time.
At this point, you should also see the N network and be able to connect.
If by now you've been able to connect to two unhidden unsecured networks, you can then turn on security to one (you can try them from weakest to strongest - WEP, WPA, WPA2) and see if you can connect to them. You should be able to. Oh, and make sure, if you get to WPA2 and your router has a setting for it, use AES only and not AES-TKIP. There seems to be a consensus to not use TKIP for some reason.
After all that, try setting your radio to Mixed (G and N) to see if you can still connect.
It's a pain but the only way you can find out where it fails.
Let us know if any of this helped.