I had no end of problems with my iphone and my old router (wrt54gs). I ended up setting a static ip to the phone and while it did work, the phone lasted about 2 or 3 days before refusing to work correctly wirelessly.
In the end I upgraded to the linksys wrt54g2 and it works flawlessly.
i really cant explain why the wrt54gs wasnt fully compatible, but as others have said, maybe its a different implementation of wifi?
apolgies for dodgey spelling.. bit drunk