ping is a COMMAND that sends a packet to another computer, receives a reply for that packet and reports how much time it took to get the reply. This is called LATENCY and has nothing to do with bandwidth. It is just the time it takes for your computer to get a response from another networked device. High latency means that it takes a lot of time to get that response, low latency is that you get a response almost instantly. Latency (which some incorrectly call "ping") is usually expressed in milliseconds.
Bandwidth is the amount of data you can send within a certain time frame, usually expressed in Mbps (Megabit per second) or Gbps (Gigabit per second), but there are other speed indicators as well.
It gives you an indication of how fast you can download and/or upload data to and from a network (usually the internet, but also applies between two directly connected devices).
For online gaming for example, you don't really need high bandwidth, but you need low latency. If you're playing a first person shooter in a virtual world, you want to see other characters moving in real-time, so you want to responses between all the clients and the server to be as low as possible. If you have a high latency connection, characters will move around and you will only get the visualisation long after they've moved.... so if you want to shoot something or someone, you can never tell if the target is still in that place.
With a low latency connection, those changes are relayed to the clients almost immediately so you'll feel like you're in a real-time environment.
A satellite connection is an example of a high-bandwidth and high-latency. You can send large amounts of data in a short space of time, but the latency is high because the signal has to travel to space and back before it reaches the computer you're connecting to. It is good for downloading data, but not for online gaming (for which you need low-latency).
E.g. if you send a signal through a cable from your house to your neighbour's computer, you travel a few dozen meters. If you have a satellite connection, it travels 60000km up in space, and back down. Even at the speed of light, this takes a while and that is what's causing the latency.
Bandwidth and latency are just 2 properties of a stream of data and both properties do not influence each other necessarily. Both properties can affect your network experience in different ways as I've illustrated above.
In an ideal world though, you want really high bandwidth and really low latency. This means that you can send and receive a lot of data and you get immediate responses.
If you get 1mbps and 5s latency, you'll send 1Mbit in 1 second, but you'll only get the reply that it's been received 6 seconds later.
When you hit send, 1Mbit will be sent in 1 second, after (about) 2.5 seconds the receiving party will see the data come in and at 3.5 seconds he will have received the 1mbit of data. At 6s you will have the reply that your data has been successfully sent.
That is the basic idea anyways.