Hard work, and a massive amount of inherited money.
I actually really like Spider-Man for that reason. Yes, he had the luck to be bitten by a radioactive spider, but he also built a ton of his gadgets himself (in the comics, for example, the web shooter is all him) and took on a ton of responsibility at a very young age.