Fighting "numerically superior opponents whose reinforcements seem almost ceaseless" is something I do with extreme ease. Wanna know why? Well its because I don't give my opponent anything without making him fight for every inch. How you say? Well the First Step is to put your cities in defend-able positions. Second Step, is to not let your opponent gain a significant scientific lead on you. Third Step, is to take away all the land advantages your opponent may use against you and use them to your advantage. Fourth Step, is to build an army that counters your opponents. Fifth Step using your army properly. Now easier said then done correct? well let me go into further detail for you.
Put your Cities in Defendable Positions.
When deciding city placement, make sure to carefully inspect the area you want your next city. Look for things like hills, trees, rivers, mountains and peninsulas, all of these can be used to protect your city and make your enemy pay the full price for every attack.
Hills, trees and rivers are very important because they boost your defense or weaken your enemies attack (trees however do not boost your cities defense). When deciding where to put your city next to a river, try to make sure the river isn't between your capital and your new city. This will make it not only harder for the enemy to surround your city but cut your enemies attack strength in half. Hills boost your cities defense strength, so if you can place your city on top of one, do so (also helps with production). Trees hurt your cities defense more then help, try to not place your city in the middle of a forest. If you must place your city in a forest make sure no forest is next to your city (See illustration). Use mountain ranges to channel your enemies and keep them from surrounding you ( Surrounded = Death). Peninsulas are my favorite as you place your city at the tip and block it off with a citadel. (see illustration Peninsula Defense)
Do Not let your opponent gain a significant scientific advantage.
I prefer to build as many scientific buildings as I can, especially when playing above Prince difficulty. Not putting all of your efforts into science is usually fatal in higher difficulties.
Don't Allow your opponent any land advantages.
Allowing your opponent positions such as; hills, forest, HILLS AND FORESTS COMBINED! allows them to take very little damage from your ranged units especially when they have more advanced units. To avoid this keep fortified units on these hills and forests next to your cities and even use the flanking technique if you have to (see illustration). And while defending never attack your opponent from across a river you will receive more damage then its worth.
Counter your opponent
Pretty simple don't be building Knights when he has Pikeman and don't be going heavy ranged when he has Knights. Counter his Longswordsman with Crossbows and Trebuchets, and his Knights with Pikeman and his Pikeman with Longswordsman. Also going Knights when your opponent has a lot of range will allow you to quickly pick off his ranged units and make an even quicker escape. Its one big circle but it works out if your quick on it. (Keep in mind I'm using the late medieval era Units as an example, obviously Knights are any fast moving units, Trebuchets and Crossbowman are any ranged units, and Pikeman and Longswordsman are land units.)
Use your army properly!
If you didn't realize this step is redundancy of 3 and 4 you weren't paying attention and now you must start over. But seriously it is incredibly important when defending to realize that you are DEFENDING! make your opponent attack you. Keep your units fortified and keep your fast moving units in the back patiently waiting to strike down any ranged units or weak units running away. And always keep your ranged units protected so they are as deadly as they should be and keep a hill or tree between you and their ranged units if you can't get close to them. And 5 steps sounds way better then 4...
My lovely illustration C; Don't dis it :c