I wasn't aware of the 10000bc limit, but then - at less than 1000bc - my trade income is negligible compared to the 28K of taxes. But when I went above 20000bc, the hit on taxes was so enormous, my balance went from a 4-5K surplus right into the red! Oh well, I used that cash to rush-buy the Temple of Neutrality (about 14500bc IIRC) - didn't want to bother with about 80 turns build time anyway, and it gave me the liberty to build it on some low industry planet with no good use for it's tiles
Anyway, economy can be a huge problem in mid game, if you don't take precautions right from the very start. I did a couple of games where I didn't (take precautions), and the results were 1.5-2 game years of "depression", i. e. being far in the red, not being able to produce, buy stuff, or do just about anything. As a matter of fact. the situation desribed above (i. e. the 28K tax income) is from a game where I suffered from similar problems for more than 2 game years, and while I was actually able to prevent going into the red this time, it took me that long to build up an economy strong enough to support my immense research output (up to 20K rp per turn last time I checked). I may have been overdoing it a bit
It's generally safer to just build economy buildings (markets and the like) on any planet tiles where you don't have a good reason to build something else, and only add productive and other buildings (or upgrade markets to those), when You see You can afford it.
There are many ways to earn money, but I've found taxes to be the most reliable. You need bonuses to morale via techs, yellow mining resources, or morale buildings to keep people happy in spite of high taxes, and you need high population to make building markets worthwhile (they'll earn you a small profit from around 1-2b population, depending on your tax rate).
All of these factors are under your control, except of course that you can't mine morale or economy resources if there are none. You can loose population due to invasions, but unless you're actually losing a war it shouldn't be hard to "regrow" those losses.
Most other sources of income are affected by luck and how well you can deal with the AIs (preventing wars, trading). It is possible to increase your chances of positive outcomes, but ultimately you can't rely on it.
Regarding the problem at hand, if you're about to go bankrupt due to a strong deficit, the first thing to do is lower your overall production slider from 100% to 0 and see if that is enough to get you back into the black. If it doesn't you're in real trouble, and you'll better give a better description of the state of your game, so we can offer better advice.
If it does, the next steps depend on your current game:
a) if you have tech trading on, a number of good techs that the other races don't (and that you are willing to trade), try selling these for a good price.
b ) You may even try to trade influence points for cash: note that the AI disregards any offer of more than 999 influence points, but nothing prevents you from trading multiple chunks of points. Depending on your diplomacy rating, you may be able to trade 100 bc for as little as 200 ip, or as much as 800 ip (at least those are the numbers I've seen)
c) if you have lots of planets, try lowering taxes for some turns to increase population growth, so you get more tax payers. While doing this, check your lowest approval planets and see if you can't make them happy (building some morale building or whatever). Also check your highest population planets if they have free tiles and build economy buildings there. Upgrade factories (or labs) to markets if you must, unless of course if they're sitting on (and taking advantage of) a bonus tile.
d) Check trade routes - both your own and others. If you see sectors with many trade routes running through them, consider buiding an economy starbase there. If you don't have constructors, check your fleet for outdated ships that can be upgraded to a design of similar cost bearing constructor modules. Caution: starbases are a priority target in times of war! If you are currently at war, disregard this advice, otherwise make sure you can defend the starbase in case of an attack. (P.S.: this only works well if you already have some ships/constructors to spare; actually building constructors for this purpose is an investment that takes a long time to pay back, and may not be suitable for the emergency situation you're in)
e) Check your spending: military ships and constructors(!) cost maintenance. Upgrade those you don't need to something that doesn't, or decomission them. Leases can add up: while you can't change the rates you're currently paying, make sure you don't buy by lease unless you're sure you can afford the rates. Also, maintenance costs for all your buildings can add up. Check the ratio of productivity of each building against the maintenance cost per turn, and you'll see some buildings are worse than others of the same type. In such cases it would be better to replace the ineficient types, or just decomission them. Finally production cost, as MarvinKosh said; if you can't afford to run your factories and labs at full capacity, then you either need to demolish some, or build a stronger economy that can support them.