It sounds like your MacBook Pro has either incorrect or missing DNS IP address information in it network profile. Let's start with your wireless connection. You would find these in System Preferences > Network > Wi-Fi > Advanced > DNS tab
If your main Internet router is performing as the DHCP server, it would provide the DNS IP addresses (typically from your ISP) on this tab. You may have two or more addresses listed. If they are grayed, that means that the addresses are coming from the DHCP server.
In the following example screen shot, I am using DNS servers provided by OpenDNS. Notice that they are grayed as they are being provided by my main Internet router. Again, these should be either ones provided by your ISP or ones you purposely set up, like my OpenDNS ones.
First are the DNS servers that show up the ones that your ISP has provided you? That is, are these the same DNS servers addresses that are assigned to your other network clients that can gain Internet access?
If you are not sure what the correct IP addresses are for your ISP, you can always substitute the OpenDNS or Google DNS servers instead.