I'll just give you a general idea.
You need to get a few wonders. The most important one being pyramid. It enables you to get all the government civics. Representation being the best one to use early on since it provides you with happiness bonus to your largest 5 cities (you won't have more than 5 cities at the start of the game), and also most importantly +3 science per any specialist. So a scientist normally has +3 science would have +6 science. Your goal is to run as many scientist as possible using the caste system or if you don't have it, using the library. If you never did this before you will be surprised at how fast you can research, in most cases you speed up your early research by 25-75%.
But not only will you have the benefit of faster research speed, you are more likely to generate a great scientist (GS) by doing this. GS can be used to build an academy which add 50% research or it can be added to a city for +9 science under the representation civic. Furthermore you could use it to discover technology instantly. GS has the benefit of being able to discover quality technologies since most of the useful techs in the game are of science related. In early games, one GS can instantly discover important techs such as philosophy. While in mid to late games, it can help discover around half or more for most technologies such as chemistry. And finally in an average game if you run pacifism for religion civic and also build the great library and national epic at your most scientist concentrated city (usually your capital), you will get around 5-10 GS per game. If you use it all for discovery techs, it would account for 25% of your entire games research if not more.
Another important wonder is the oracle. It's the early wonder that gives you a free technology. The key is to build it as late as possible, but early enough so that no one else builds it. You want to get the useful techs such as civil service or machinery, but if thats too hard then at least try to get code of law or metal casting with it. Civil service is perhaps the most important, so your goal would be try to research its prerequisites as soon as possible, taking the shortest line as possible. So while you are researching code of law you are also building the oracle, and once code of law finishes, oracle should be finished too, you must time it right. You can adjust the speed of science and also the speed of production of oracle. However you can't always get this, but you just got to try your best to get it since it's really useful. If you can't then just use the oracle to try to get something else.
The reason civil service is so important because it gives you the ability to run bureaucracy for legal civic and when combined with the machinery tech and copper/iron, you can build macemen! When you get macemen using this way, you will be way ahead of your opponents. Most of them only have archers and axemen at this stage, which should be easy picking for macemen. In my last game, my kill-to-lost ratio was well over 10-1. Every of my fights was around 80-90% win range simply because I was killing archers with macemen. Your problem was because you simply had too many units to support, with this strategy though, you can even run pacifism (which cost 1 gold extra per unit), and still have lots of gold since you only need a few macemen to wipe a civ out.
If the map is pretty small and your opponents not that strong, then yeah, you can even win with just macemen. And you will win fast, most likely before 1000AD. But if you don't want to over extend yourself and play a safer game, then continue to put research as your main priority. Try to research the next military super weapon. If you don't wipe your opponents out fast enough, they will upgrade to longbowmen, which is a lot tougher for macemen to kill without lots of siege weapons help. In my experience when longbowmen comes out, the win ratio drops to around 40% when trying to attack their cities guarded by longbowmen, which is not good for the poor macemen.
So what's the next big military weapon? Well depends on the civ you are using, some may have a good unique unit. For example if you are using Romans you probably wouldn't even use macemen since you got praetorians which are equal to a macemen and faster to research. But this strategy shouldn't have to rely on unique units. You can win with any civ. The next big military leap you will have should be calvary. This thing doesn't come too late, it needs horses obviously, but also military tradition and gunpowder. Your goal is to utilize your GS and discover all the prerequisites to those techs as fast as possible. In some cases I've been able to get cavalry out before the computer got longbowmen, so I'm fighting cavalry vs archer, which is usually 95-99% win. But assuming now they all got longbowmen, your win ratio should be around 70-80%, and since cavalries are fast movers, it doesn't matter if a few dies since reinforcements come fast. Usually 2 cavalries can take a city.
By doing this, you don't need a huge army, but you have an advanced army which fights 10-1. If before you need 100 units, now you probably only need 10 units to do the same job. And can you still win early? Yes, yes you can, maybe not before 0AD, but definitely fast enough before the game ends. But usually it's around 1000-1500AD if you don't try to maximize score by population boosting at the end and delaying victory.
Oh and another thing, you need to raze the cities when you conquer them, because city distance to capital maintenance is a killer. Or if you want to capture them, at least have state property running (the communism economic civic) or forbidden place and versailles well positioned.
Oh oh, another thing, don't upgrade or promote your units too soon. The reason is because when you upgrade you actually heal half of your damaged health. For example assuming you didn't upgrade when you made the units, and when you see a fight that is 96% win, then just fight it without upgrade. You know you are going to win most likely when it's >95%, it's not a big risk to take. When at the next turn, you probably lost half of your health during the fight, when you upgrade now you can recover 25% health back since half of half is 25%. This is a fast way to heal so you can finish off 2 archers if you just got 1 macemen for example in consecutive turns without waiting. Another advantage to this is that you don't know what's going to be a useful upgrade, because sometimes you get to a city and it's full of archers, then upgrading for 25% vs archers would be wise, but what if it's full of axemen, then 25% vs melee would be a good choice, and if they are mixed then 20% city attack. While 20% city attack is the safest option most of the time it may not always be a smart choice. 20% and 25% would be a big difference in the 70-80% fights, because 25% may mean you survive while 20% may mean you die.
Oh one final thing, most of the percentages there are based on cities with none to moderate city defense bonus, they are not based on cities with 100%+ city defense bonus and situated on a hill top. Even if you have a calvary vs archer with those conditions you are not guaranteed 60% win. I usually have a few siege weapons for bombarding to reduce city defense bonus in big cities and capitals, I never use them for suicide. Usually any city with 3 or less units guarding and 40% or less city defense bonus don't need bombarding.