Hmm, starting to sound like a Linksys issue. I peeked over here on the Linksys forum:
http://forums.linksysbycisco.com/linksys/board/message?board.id=Wireless_Routers &message.id=105636&query.id=14016#M105636
and found a guy who said (emphasis mine)
<quote>
I have a similar problem in that *I set up my Linksys WRT54G router with a static IP address*, which has two DNS addresses. I'm also using WPA2-AES. *If I switch my router back over to DHCP, my Iphone 3G and my original Iphone can both connect to the router and access the Internet. But, as soon as I switch the router back over to my static IP address, both Iphones can connect to the router, but neither can access the Internet.* I've given Linksys many opportunities to solve this problem; especially since I'm not the only one having this problem. But, I've finally thrown in the towel an moved on by purchasing a NETGEAR - RangeMax Next Wireless-N Router for $89.00. I plugged it in, popped in the CD, followed the setup instructions, and I was up and running in 10 minutes. And yes, both of my Iphones work just fine.
</quote>
Hope this helps.