Gravitational slingshot is an aerospace term used in orbital mechanics referring to the use of the motion of the planets in the solar system in order to alter the path and speed of an interplanetary spacecraft. It is a commonly used maneuver for visiting the outer planets, which would otherwise take many years to reach.
Consider a spacecraft on a trajectory that will take it close to a planet, say Jupiter. As the spacecraft approaches the planet, Jupiter's gravity will pull on the spacecraft, speeding it up. After passing the planet, the gravity will continue pulling on the spacecraft, slowing it down. The net effect on the speed is zero, although the direction may have changed in the process.
So where is the slingshot? The key is to remember that the planets are not standing still, they are moving in their orbits around the Sun. Thus while the speed of the spacecraft has remained the same as measured by Jupiter, the speed may be different as measured by another observer, say here on Earth. Depending on the direction of the outbound leg of the trajectory, the spacecraft can gain a significant fraction of the orbital speed of the planet. In the case of Jupiter, this is over 13 km/s.
The speed gained, again, as seen from Earth, is rarely important in of itself. We typically don't fly spaceships to random points in space, but particular places like planets. Even in this case the slingshot has a number of applications.
It is important to understand how spacecraft move from planet to planet; they do not fly directly from point to point, because the planets are themselves in motion. If you travel directly outward from Earth to Mars, you'll arrive to find yourself flying right by it. This is because Earth was already moving "forward" in orbit much faster than Mars, 30 km/s vs. 24 km/s, so unless you have lost that extra 6 km/s you'll be going far too fast to enter orbit.
The traditional way to solve this problem is to use a Hohmann transfer orbit, a new elliptical orbit with the Earth at one focus and Mars at the other. If you arrange the timing correctly the spacecraft will arrive at the outer end of its orbit right as Mars is passing by, at which point only a small correction is needed to enter orbit. These types of transfers are commonly used for moving between orbits over the Earth, Earth-Moon and Earth-Mars transfers.
A Hohmann transfer to the outer planets requires long times and considerable "delta V", the total change in velocity needed to speed up and slow down at either end of the orbit. This is where the slingshot finds its most common applications. Instead of Hohmann trajectory to, say Saturn, the spacecraft is instead sent in a path that is aimed more directly at Jupiter, and slingshot is then used to change the direction of the spacecraft towards Saturn. In doing so, even small amounts of fuel spent in positioning and accelerating the spacecraft on its way to Jupiter will be magnified many times once it arrives. However it also means that the craft arrives at Saturn flying very rapidly by it, a so-called "fly-by mission". Such missions require careful timing, which is why you often hear references to a launch window when discussing them.
It is possible to use the slingshot to enter orbit as well. In this case the slingshot around Jupiter is used to slow the spacecraft, losing some of the 20 km/s difference in the Earth-Saturn orbital speeds. A Hohmann transfer to Saturn would require a total of 15.7 km/s delta V, which is not within the capabilities of our currenct spacecraft boosters. Instead a spacecraft is sent towards Jupiter, where the slingshot changes its direction and speed so that it will intercept Saturn at the proper velocity. This trip may take longer, but will use considerably less delta V, allowing a much larger spacecraft to be sent. Such a strategy was used on the Cassini probe, whose 6.7-year transit is slightly longer than the six years needed for a Hohmann transfer, but cut the total amount of delta V needed to about 2 km/s, so much that the large and heavy Cassini was able to reach Saturn even with the small boosters available.
Another example is Ulysses, the ESA spacecraft which studied the polar regions of the sun. All the planets orbit more or less in a plane aligned with the equator of the sun: to move to an orbit passing over the poles of the sun, the spacecraft would have to change its 30 km/s of the Earth's orbit to another trajectory at right angles to the plane of the Earth's orbit, a task impossible with current spacecraft propulsion systems. Instead the craft was sent towards Jupiter, aimed to arrive at a point in space just "in front" and "below" the planet.
As it passed the planet, the probe 'fell' through Jupiter's gravity field, borrowing a minute amount of momentum from the planet; after it had passed Jupiter, the velocity change had bent the probe's trajectory up out of the plane of the planetary orbits, placing it in an orbit that passed over the poles of the sun, rendering that region visible to the probe. All this required was the amount of fuel needed to send Ulysses to a point near Jupiter, well within current technologies.