From the year 568 AD all the way until the late 19th century, Italy was divided. Measured on this time scale, the movement to unify Italy — dating from about 1815 to 1870 — happened at light speed. The story, told in this really neat animated map, is fascinating. It also gives an interesting perspective on today's debates about nationhood in places like Iraq.
But first, the map. The swell in support for Italian unification really began in 1815, after the Congress of Vienna divided up post-Napoleon Italy. The map starts in 1829, after the central Italian Duchy of Modena and Reggio began expanding. It then goes forward all the way through the country's final unification under the banner of the Kingdom of Italy (newly renamed from the Kingdom of Sardinia) in 1870. Pay close attention to 1848-49 (the first Italian war of Independence) and 1859-1861 (the second war of independence and its aftermath):
Italian unification was by no means a simple process. On the pro-unification side, the Sardinian monarchy eventually fought in an at-times uncomfortable alliance with more radical nationalists like Giuseppe Garibaldi. They were opposed principally by Austria and the papacy, and fought (at various times) both with and against France. It's impossible to do this history justice in a short article, but Derek Beales and Eugenio Biagini's The Risorgimento and the Unification of Italy is a classic, widely respected introduction to the relevant history.
The fact that Italian unity ended up sticking — that Italy is still a unified country today — is instructive. In 1815, Austrian statesman Klemens von Metternich dismissed the idea of Italy as "a geographical expression" — basically calling Italy a place riven by regional divides and Italian identity a lie. Metternich's comment strikingly similar to the way some people talk about new, deeply divided countries today, such as Iraq or Syria. It took Italians decades to unify after the Congress of Vienna; by comparison, Iraq has had almost no time to put itself together since the fall of Saddam Hussein and the American withdrawal.
Of course, 21st century Iraq and 19th century Italy are very, very different places. Perhaps most importantly, Iraq's borders were colonially imposed, whereas Italy was built out of a long-running of Italian identity. But the point is that it's easy to assume that what's true now — Iraq is divided, and faith in the national project is weak — will be true forever. Metternich thought Italy would be ever divided, and look how that turned out.