IMO, this isn't a question that has a definite answer. It all depends on exactly what you've got.
If both your amp and your bass are real crap, to the point where they're scarcely acceptable, I'd get a new bass first. That's your first interface with what you're trying to play.
I'm a proponent of the "good enough" rule. If your bass is "good enough"--i.e., at a basic acceptable level of quality, capable of being set up reasonably well and of emitting a decent (doesn't have to be great) tone, I'd get a new amp first. In that setting, that's where you'll get the most quality improvement for the $. If your amp is "good enough" for what you're doing, I'd get the bass first.
I know it's often said that a great amp will make a lousy bass sound good, but IME that's sorta but not entirely true. A great amp will often make a lousy bass sound *better*, but that's not the same thing. And sometimes, as was said earlier, great gear will let you hear just how bad your bass is. Especially if it's very revealing gear like, say, Euphonic Audio.
A lot depends on your personal situation too. If you know you'll be able to get both bass and amp before too long, and the question is which to get first, I'd get the bass first. More immediate gratification. If you have to pick one, and don't know when you'd be able to get the other, I'd get the bass first if your current amp will cut it for your current playing situation (i.e., is "good enough"), and the amp first if your current amp is physically incapable of doing the job.
Personally, I'm kinda with what rickbass said earlier--to me it makes sense for your bass and amp expenditures to go roughly hand in hand, without overspending wildly on either aspect. Somebody earlier (embellisher?) said he'd rather play a Squier through an Eden than a Zon through a Rogue. I would too; but frankly, I'd rather play a Carvin through a (big) Carvin than either of those choices. Not because Carvin is the ultimate in either bass or amp, but because (a) the bass-amp quality ratio is more evenly matched, and (b) I think your TSQI (total sound quality index--how's that for a bogus buzzword?) is higher that way. In other words, more net sound improvement for the $.