Graduating in the physical and natural sciences, he was professor of botany at the University of Naples. From 1857 to 1861, he taught at the University of Pavia, of which he was also magnificent rector (Magnífico Reitor). After returning to Naples, he was director of the Neapolitan Botanical Garden from 1861 to 1866.
Gasparrini was a member of several scientific institutes such as the French Academy of Sciences, the Accademia Pontaniana, and the Academy of Physical and Mathematical Sciences of Naples, of which he was appointed president until 1862. He died in Naples in 1866.
Osservazioni sopra talune modificazioni organiche in alcune cellule vegetali, Naples, Stamperia del Fibreno, 1863
Ricerche sulla Embriogenia della Canapa, Naples, 1863
Ricerche sulla natura dei succiatori e la escrezione delle radici ed osservazioni morfologiche sopra taluni organi della Lemna minor, Naples, Tip.Dura, 1856;
Ricerche sulla natura del caprifico, del fico e sulla caprificazione, Naples, tip. Di Aquila/Puzziello, 1845
Ricerche sulla natura degli Stomi, Naples, 1842
Ricerche sulla natura della pietra jungja e sul fungo che vi soprannasce, Naples, Gerolomini, 1841
Descrizione di un nuovo genere di piante della famiglia delle Leguminose, Naples, 1836