In this stage, you can by no means outresearch a SCI/COM/SEA Civ that's doing well. Forget it.
I assume you're somewhere end AA/early MA. Which Gov?
I assume Republic; Monarchy...you better get MDI and keep fighting.
So, Babylon of course has a free tech. Any more SCI Civs in the game?
All AI will preferably research Feudalism first. By all means, either steal that one, or research it by yourself. Being a Gov tech, the AI will demand obscene prices.
Mono/Eng/Inv/Theo are about as likely to be researched by the AI.
Unless you desperately need Longbows, go to Theology ASAP. Ignore Chivalry.
Printing Press is the best shot for a monopoly tech in the entire MA - but, if it fails, you have nothing from that tech. I for one would go for it, if you can research it either reasonably fast, or you cannot afford anything but minimum anyway - in that case, you can as well gamble.
But Theo also opens up Edu. And that one more useful techs.
The bottom branch OTOH is linear, no choices there. That's why I'd always head the upper path.
How to handle Deity/Sid AIs? IMHO the crucial thing that is often overlooked is the resource management. On those levels, the usual AI Civ will outproduce you anyway.
So, you're indeed better off to attack Civ A lacking Iron, even if Civ B is only half as big as A.
You can deal with almost any amount of Archers/Longbows/Guerilla/Marines/TOWs the AI throws at you.
But half as much Swords/Knights/Cavs/Tanks....
Thus, plan wars well - get rid of their resources ASAP. Their cities don't matter much in the begining.