Question: When I step on gas pedal, the engine revs up but there is no acceleration. When step off gas a bit it car starts to accelerate again. It's a manual transmission. 2005 Toyota Corolla. This is happening more and more frequently.

Is this a problem with the transmission, clutch or something else altogether? And wondering if it's going to cost a lot to fix.

Answer: 
This sounds like the classic symptoms of a slipping clutch.

The solution is to replace it or have it replaced. If it is a DMF (Dual Mass Flywheel - fitted to reduce vibration) type then it is usually a good idea to replace that as well at the same time.

The minimum will be a centre or friction plate, but personally I will always fit a new pressure plate at the same time. If the flywheel surface shows serious signs of wear then that may need skimming or replacing.

As for prices, they vary between countries, and within countries even, for the cost of labor, parts also vary in price, so you have to find out for your area.
While I agree it is probably a slipping clutch, before I had the cluth and pressure plate replaced I think you would want to have the clutch pedal cable checked to see if it is mis-adjusted. In some cases the pedal play may be causing the clutch to be slightly engaged even when your foot is off the pedal. This adjustment should be very inexpensive if you haven't already polished (hence damaged) the friction plate.
The sooner the better to avoid further damage.