There seems to be no proof that he belonged to the family of famous architects of the same name, which included Domenico Fontana. Born in Brusato, near Como (now part of the town of Novazzano in Canton Ticino, Switzerland), Fontana went to Rome before 1655. He became a draghtsman for the architectural plans of Pietro da Cortona, Carlo Rainaldi, and Gian Lorenzo Bernini. Bernini employed him for nearly a decade in diverse projects.
His first independent project may be the church of San Biagio in Campitelli, completed by 1665. His façade at San Marcello al Corso (1682-3) is described as one of his most successful works. For his patron, Innocent XI, he erected the immense building of the Istituto Apostolico San Michele at Ripa Grande, organized around its church; the baptismal chapel at St. Peter's; and slightly modified and finished Palazzo Montecitorio, which had been begun as Bernini's Palazzo Ludovisi, for Niccolò Ludovisi during the reign of the Ludovisi pope Gregory XV, and which he publicized by a Discorso (1694).
At the request of Clement XI he built the public granaries (Olearie Papale) within the ruins of the Baths of Diocletian  (currently used for temporary exhibitions), the portico of Santa Maria in Trastevere, and the basin of the fountain of San Pietro in Montorio. He designed the Casanate library at Santa Maria sopra Minerva, designed the ribbed hemispherical dome for the duomo of Montefiascone (completed long after his death) and the casino in the Vatican, and collected all the models of the building.
Fontana mainly worked in Rome, assisted by his nephews Girolamo and Francesco Fontana (1668-1708), but he sent a model for the cathedral of Fulda, and others to Vienna for the royal stables. Among his other foreign works were the designs for a Jesuit monastery in Azpeitia, Spain, in the village of Loyola where Saint Ignatius of Loyola, the founder of the Jesuit Order was born. This grandiose basilica was a major influence upon baroque architecture of the New World.
Fontana was an able artist and a good designer, but lacked the innovation that characterized early Baroque architects like Cortona and Borromini. In addition, he was more successful as an architect than as a writer. By order of Innocent XI he wrote a diffuse historical description of the Templum Vaticanum (1694), which included his project for completing St. Peter's. In this work Fontana advised the demolition of that dense nest of medieval houses called La Spina which formed a sort of island from Ponte Sant' Angelo to the piazza of St. Peter's; the project was completed under Mussolini, creating the Via della Conciliazione. Fontana made a calculation of the whole expense of St. Peter's from the beginning to 1694, which amounted to 46,800,052 crowns, without including models. He also published works on the Colosseum; the Aqueducts; the inundation of the Tiber, etc. Furthermore, twenty seven manuscript volumes of his writings and sketches are preserved in the Royal Library at Windsor.
Fontana was principe of the Accademia di San Luca in 1686 and 1692-1700. Fontana's studio was one of the most prolific in Europe; its designs for fountains, tombs, and altars were often imitated or reproduced abroad. Among Fontana's disciples, who spread his fame throughout Europe, were Giovanni Battista Vaccarini in Sicily, Filippo Juvarra in Italy and Spain, James Gibbs in England, Matthaus Daniel Poppelmann in Germany, Johann Lucas von Hildebrandt and Fischer von Erlach in Austria, Nicodemus Tessin the Younger in Sweden, and Nicola Michetti in Italy and Russia. Other Fontana pupils include Giovan Battista Contini and Carlo Francesco Bizzacheri.