Overturn is probably right. To check if you need to replace the chain/cassette, get a measuring tape, and measure the distance between 12 links in the chain, from pin center to center. It should be exactly 12 inches. As chains wear, this increases slightly. 1/16 of an inch in excess is the point where many people replace the chain. 1/8 means definitely replace the chain, and the cogs might be bad too. More than that and you'll almost certainly have to replace both.
My guess is you probably have a solid 1/8" of stretch, and you'll need to replace the chain and the cassette. Note you can't replace just one of them (like the chain, for instance), as the worn one will wear the new part until they mate, and you'll be back where you started.
One unlikely alternative - is the thing changing gears when it slips, or is the chain just moving over the cassette? Does your derailer cable go under the bottom bracket? If it's also shifting while slipping (called autoshifting), it could possibly be gunk under the bottom bracket that's catching the shift cable, which pulls on the derailer when you really mash on the pedals, causing shifting. This is most common on steel frames, because they're flexible.
But check the chain/cassette first, 95% chance that's what it is.