The Trevi fountain is a imposing fountain that served as a display of an ancient roman acqueduct termination.
The acqueduct is the Virgo - Virgin in English - Acqueduct constructed by Marcus Vipsanius Agrippa around 19 B:C: Agrippa was the son-in-law and the favorite general of Emperor Octavian Augustus. The acqueduct was 21 km long but 19 were underground.
The acqueduct was built by Agrippa to supply the thermal baths he built in the Campus Martius, by the Pantheon. There was a fountain at the end of the acqueduct already then. The display spilling water was located on the site of the actual Church of St. Ignatius.
According to Sextus Iulius Frontinus' specialised book "De aquaductibus Romae commentarius", the acqueduct takes its name from a virgin lady that the Roman soldiers met when they were thirsty and tired. She lead them to a source of water to restore. That source was in the Ager Locullanus, the land between the Tiburtina road and the Collatina road, two of the many roads that led to Rome. That source still today supplies the acqueduct.
In the 4th Century there were in Rome 1352 fountains (Notitia dignitatum imperii Romani).
The acqueduct was damaged by the invasion of the Ostrogoths led by king Vitigis in 537. After the barbaric invasions the last portion of the acqueduct was abandoned and all the medioeval restorations did not continue further than the trivium crossing.
Starting from the early renaissance the popes start to decorate the end of the acqueducts they restored with large fountains that were richly decorated.
Bust of M. Agrippa, Louvre, Paris
Church of St. Ignatius, Rome