If your firewall is not configured correctly, you would most certainly experince this issue. I too was able to ping one server but could not get a web page to open even though everything else seemed right. The firewall fixed it.
This is a complex topic, and I'd suggest doing "man iptables" on a terminal to check the documentation and also look up further resources and tutorials. If you just want a quick check that this is indeed the issue, you could do the following on a terminal.
First, back up your existing iptables, e.g.:
mv /etc/sysconfig/iptables /etc/sysconfig/iptables.bkp
Then using your favourite text editor, create a new /etc/sysconfig/iptables file with the following text:
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
This will allow you to ssh into the machine (port 22) as well get http (80) and https (443) working. For these changes to take effect restart the firewall:
service iptables restart
If you still can ping but cannot access any web page, you may have to troubleshoot your http server.