Safari can load internet but none of the other apps cannot!
Since DNS resolves but the ping responses time out, we can rule out a DNS issue.

Things to try to diagnose the source of the problem:


It's possible that IPv6 is working but IPv4 is not.  Try ping6 ipv6.google.com to see if this is the case.
Find out whether a proxy has been configured that Safari might be using. Go to System Preferences, and search for Proxies to jump right to the tab in the Network config (also accessible from Safari preferences > Advanced > Proxies).
Confirm that other devices on the network don't have this same issue. It's possible that a transparent network proxy is filtering traffic.
Restart the computer, because this is a pretty unusual problem.