The U.S. has never officially been a “two party” system. It just turns out that usually two parties tend to dominate. Sometimes though those two parties don’t dominate, things get chaotic for a while, and you have different parties gaining power. So far, it has always settled back down to two major parties once the dust settles.
To add to Northern Piper’s post, the Federalists fell apart after the War of 1812. The Democratic-Republicans split over internal disagreements (slavery, trade tariffs, basically all of the stuff that set the groundwork for the U.S. Civil War) forming the Democratic party. The Whig party grew out of opposition to the Democrats, and as Northern Piper’s post said, these two parties dominated until the mid 1800s.
The Civil War shook things up again. Leading up to the Civil War, the Democratic party split into a northern and southern faction. In the 1860 election, the recently formed Republicans (led by Lincoln) won carrying 18 states. The Southern Democrats came in second, with 11 states. The Constitutional Union party carried 3 states and the northern Democrats only carried 1 (Illinois). And because Lincoln won, the Civil War was off and running (all of the things that factored into the Civil War are a few dozen threads worth of stuff on their own, way beyond the scope of this thread).
In the aftermath of the Civil War (the fourth party system in Northern Piper’s post) there was the Progressive movement, which died out around the end of the1890s. The Progressive party allied themselves with the Democrats, and pretty much fell apart after that. The Republicans and Democrats have dominated politics since then, though exactly what the parties have stood for has tended to drift a bit over time.
Personally, I’m not seeing a clear dividing line between what wiki is calling the fourth, fifth, and sixth party systems. There have been some rather dramatic social and political changes in the U.S. since then, but the Republican and Democratic part have continued to dominate the political landscape. As I recall, the only major challenge to the dominance of these two parties came in the election of 1992, when Ross Perot took an early lead in the election polls (his campaign later self-destructed and he ended up not carrying a single state). I suppose you could make the claim that smaller parties (Libertarians, Constitution Party, Green Party, etc) have been a bit more influential in elections in the past few decades, but I personally wouldn’t separate this into a different political era.
The earlier dividing lines (chaos following the War of 1812, chaos leading up to the Civil War, and the aftermath of the Civil War) all resulted in major political restructuring with different parties coming to the forefront and dominating. Since then, though, it’s just been the Democrats and Republicans.