Having the same problem with my iPhone 4 w iOS 4.0.2. It works on other wi-fi networks, and over 3g, so it's clearly a router issue.
I've got a plain old Linksys WRT54GS router -- I'm not using dd-wrt or non-standard OS on it.
Anyone have insight to the problem? Specific router settings that might need adjusting? Any help is appreciated.
Maybe try upgrading/downgrading firmwares? If you're really desperate to get it to work, switch to one of the working dd-wrt firmwares.