I had the same problem. I was able to get online but couldn't get onto google or gmail. Other computers laptops worked fine. I'm still not sure what the exact problem was but it has to do with your router/security. What happened to me was it happened when my network security was set to wpa. I changed it to none - worked fine. Changed it to wep - worked fine. Changed it back to wpa - google didn't work again.
The problem shouldn't be network security related or else there'd be a lot more complaints around here. It's most likely a router setting. I just don't know what it is since mine started working out of nowhere. Good luck figuring it out