Frank J. of IMAO says it right the first time. And he does it almost without clowning around, which has to be a first for him. One thing, though - a fourth party was how the first Republican president got elected. No, seriously, follow my logic:
In the early 1850s, the old Whig Party imploded due to the solution of the problem it had been created to exploit - economic policy and development - and the emergence of new tensions and electoral splits for which that party had no answers - the sectional split, Mormonism, mass immigration, and the growth of Catholicism. The Whig Party itself had been a relatively short-lived creature of the Second Great Awakening, composed largely of politically active evangelicals and religious liberals. By the early Fifties, the Second Great Awakening had largely run its course, and a lot of the movements and trends in said SGA had collapsed of their self-contradictions or mutated beyond the pale of American society - see the Mormon exemplar. Meanwhile, the great developmental economic booms had attracted vast new populations of Europeans - mostly Catholic - who couldn't care less about the hyper-Protestantism which was the lodestone of the Whiggish moment.
Anyways, the Whigs detonated impressively, and the back-wash almost took the Democracy with them. The 1850s saw a lot of serial High Weirdness, including a brief moment when a conspiratorial secret society - led in part by an ex-president who had himself risen to national fame twenty years previously as the bannerman of a political party predicated on the opposition to a conspiratorial secret society - nearly took over the country. The Republicans were just another bit of political weirdness, less strange than the Know-Nothings, but also less broad-based. They decisively lost their first presidential election, and probably would have decayed into yet another regional oddity like Minnesota's Democratic-Farmer-Labor Party, New York's Liberal and Conservative Parties, or the LaRouchites, if it weren't for the mad presidential election of 1860.
That was the year that the Democracy finally spun to pieces, and the sitting vice president led the southern Democrats out of their national convention and right into a splinter party. Before the campaign was over, even the border states had their own splinter party, Bell's Constitutional Unionists. Seward's wild little radical Whig third party, taken over by a charismatic former one-term Illinois congressman whom no-one had ever heard of before 1858, swept to a problematic victory due to the intervention of not only a fourth party, but a fifth one as well.
In short, third parties only win when they're not the third party at all, but rather one among a half-dozen, or the only default in an otherwise one-party system, which is, of course, naturally instable.