I'm reading Blundering to Glory, by Owen Connelly, and his contention is that Napoleon was basically very lucky, had superb sub-commanders and was opposed by sub-par enemy commanders. Was Napoleon a military genius, as would seem to be popular opinion, or was he just a mediocre commander who had circumstances on his side?
Please look at this post which I talk about exactly that. I'll be more than willing to follow up though.
Also, he was a genius, a mediocre commander could not last twenty years and only lose three battles.
There's a famous quote from Virgil having to do with this; “Audaces fortuna iuvat" (latin) - Fortune favors the bold.
Adding to this, I would say that you don't just luckily get great people under your command, you do that by being a good judge of character and being able to utilize strengths well. Maybe he was a mediocre commander, but being able to utilize people well and motivate them is a skill that very few people have. That, combined with the guts necessary to make bold attacks, combined with a little luck make for a massive military victory.
One other advantage that he had at his fingertips was the sheer amount of fearlessness that his elite units possessed. If you read about his cavalry in their defeat at Waterloo, they continually faced the enemy despite all the odds of the day being unfavorable, and did not easily break.