It depends of course on your level of achievement and current fitness, bike fit, diet, health and equipment.
If you have a dodgy bike that weighs a ton and threatens to fall to bits at any second - there's your priority. But if you have a decent bike - say 9kgs or so, made of any popular material and completely safe and serviceable then for 99% of us upgrading won't make much, if any, difference. If it does make a measurable difference - and it's hard to really measure these things - it'll most likely be a head gain, not an equipment-specific improvement.
Not convinced? Well then, in terms of bike improvements aim to reduce rotating mass - starting with the wheels. That is something you'll feel immediately in improved acceleration. You want stiffness? Again, look to the wheels. You'll feel that, too. But weight and frame stiffness overall is of little consequence - except at the sharp end of the elite ranks. Unless you race at that sharp end, why would you pay an extra few thousand dollars simply to reduce your bike by just a kilo or 2? Or stiffen up what is already a remarkably stiff triangle of steel, aluminium or carbon? It simply won't make a difference, except you'll maybe feel and perhaps look cooler in the bunch. Perhaps that matters. Or maybe not!
Maybe lose some weight yourself. After all it's you that weighs the most in this equation. Bike, 9kg or so. Rider? Perhaps you weigh 80kg with say 20-25% fat onboard (not that unusual, even with fit, fast guys). Imagine how much less effort you'll need to ride fast(er) if you dropped just a few kilos off yourself? It's all about power to weight, and improving your power without dropping some weight is just addressing half the problem. Look to achieve 12% body fat or slightly less (a lot less at elite levels) but don't go silly with diets or do dodgy things. Talk with a doctor or nutritionist if in any doubt. Eat a bit less, ride a bit more.
But if power is lacking, try intervals. Repeated hill intervals or hill sprints (150-200m hillclimbs in a biggish gear but still turning easily - don't grind!) will pick your power up nicely. Balance and consistency are the keys here. Don't just do one thing over and over - you'll get tired, probably over-tired, and become a one-trick pony. Mix it up both on a single training ride and from ride to ride.
Mix in some endurance, some power work and some speed work. And get in a bunch once in a while to get speed and endurance up quickly in tandem with your bunch riding skills.
And be consistent. Don't do a single big ride and then not do another for a month or more. You'll lose what you gained.
Make a plan and stick as closely as you can to it, injuries aside. You need to do long rides, perhaps for an endurance event? Then build up with lots of shorter endurance rides for a month or 2, get used to doing lots of miles in a week but not in one go. Then add those much longer rides in later. But repeat them weekly so your body "remembers". So you'll end up with regular, shorter rides dotted through the week and a bigger ride or race once or maybe twice a week. And build the whole thing up gradually and incrementally to avoid injury and form loss.
Remember to be consistent, as in a pattern of repeated behaviour, because that tells your body to adjust to that expected effort. Inconsistency sends a confused message to your body and you'll get a confused response. Throw in speed work and power efforts as well but don't over-train.
And plan your rests, too. A good training plan builds gradually, reaches a new level and then eases off before climbing to new heights in the next phase. You need to recover - not stop, just ease off - before aiming higher in power or endurance, or both.
More to come, I'm sure ;-)