The claim is true if we take "Italian" as meaning modern standard Italian.
At the time of Italy's unification, what we know today as "Italian" was more of a literary language than a vernacular one. The 2.5% figure cited is a lower bound figure, but the higher end only goes up to 12% or so. Either way, only a small minority of Italy's inhabitants spoke it. That's because what we call "Italian" was only one of many descendants of the ancient Latin language.
In fact, modern standard Italian was merely Florentino, a dialect of the Tuscan language spoken in Tuscany. In other regions of Italy, multiple different languages (some Romance, some not) dominated. Understandably, and unsurprisingly, few common folk outside of Florence and the city's hinterland spoke the Florentine dialect when it was chosen to be the national language in 1861.
Florentino's adoption as the Italian national language reflects Florence's cultural prestige. Notably, Florence native Dante, called the Father of the Italian Language composed his works in that language. His Divine Comedy helped established Florentine as the literary language of Italy, a statue enhanced by other literary giants writing in Florentine. This however did not replace the local vernacular language of each region.
Even today, regional languages are still quite alive on the Italian peninsula:
