Born in Lucca, he was mostly active in Venice and Rome, where he became a member of the large studio of Pietro da Cortona, often working closely with Giovanni Coli. With Coli, Gherardi was initially a trainee of Pietro Paolini in Lucca. One of his masterpieces are the ceiling frescoes in the Palazzo Colonna in Rome, celebrating the participation of a family member in the Battle of Lepanto.
In Venice, Coli and Gherardi also completed frescoes (1670-72) of the dome of the church of San Nicolò da Tolentino with a fresco of the Glory of San Nicola and in the church of San Pantalon. In Venice, Coli and Gherardi also frescoed the Library in the monastery of San Giorgio Maggiore.
One of his pupils was Cristoforo Tondini, who worked with him in San Pantalon.