Well, for starters, I think you're mixing up "turbofan" with "turboprop." Turbofans don't have propellers (they have fans) and the vast majority spin the fan at the same speed as the turbine. So I'm going to assume you actually meant "turboprop" for a moment: that's a gas turbine engine spinning a propeller.
The efficiency of turbomachinery gets terrible if the blades go much above supersonic. At the same time, you get the most power out of a given size rotor (fan, turbine, prop, etc.) by spinning it as fast as possible. So most engines are designed to spin the rotors up until the tips are about sonic. However, at the same RPM, the tip speed is a function of the diameter of the stage. In a turboprop there is a *huge* mismatch in the diameter of the propeller and the turbine. If you spun the prop so that the tips were just sonic, the turbine blades would be going really slow and not generating as much power as they could. If you spun the turbine so that its tips were just sonic you'd be getting the most oomph from your turbine but the propeller would be going wildly supersonic.The gearbox is there to overcome this mismatch in optimal RPM; it lets the turbine spin at its best speed and slows that way down to spin the prop at its best speed.
If you actually meant "turbofan" (big enclosed fan at the front of the engine), then the vast majority of them are direct drive. The turbine spins the same speed as the fan. There is still a mismatch because the fan and turbine aren't the same size but it's not as bad as with turboprops. In practice, the fan is running a little too fast and the turbine is running well below optimum speed (and hence it's really big). In some small business jet engines and, more recently, A320-sized engines via Pratt & Whitney's Geared Turbofan, they're addressing this with a gearbox as well, for all the same reasons as it was done with turboprops. The fan speed goes down some and the turbine can now go much faster, and hence be smaller/lighter, while doing the same job.
The reasoning is the same for turbofan and turboprop, it was just a much bigger issue for turboprops so it got dealt with there first. The shaft power of turbofans is so much higher, and the diameter mismatch so much lower until recently, that there wasn't as strong a push for turbofan gearboxes.