At the right time (or just before the right time). Spotting the right audience (or stumbling onto what a significant audience needs).
And, I think, being better for what that audience is trying to do than existing tools. (But maybe that was implied in your statement.) This also implies adequate tooling and libraries.
And publicity, to reach that audience (though viral is better than corporate).