When excavations began at the ancient Roman city of Pompeii in the 18th century, the place turned out to be full of penises. The ancient art preserved under ash from the 79 AD eruption of Vesuvius was so rich in willies that the English antiquarian Richard Payne Knight argued for the existence of an ancient fertility cult there. After all, there was one still alive in southern Italy at the time. His 1786 book An Account of the Remains of the Worship of Priapus has an engraved frontispiece showing an array of contemporary wax phalluses made as votive offerings.

More than 200 years later, the priapism of the ancient world can still astound us. Archaeologists have uncovered a Roman public toilet in southern Turkey with some filthy and funny floor decorations. As they hitched up their togas or reached for sponge on a stick, users of this men’s loo could look down at a mosaic of a young man holding his cock. He is labelled in the mosaic as Narcissus, who in Greek myth fell in love with his own reflection and wasted away gazing at it. Here, his attention is more focused: he’s obsessed with his own erection. As he plays with it, he looks sideways to reveal a ludicrous phallic nose. “Narcissus, what are you doing in that latrina?” his mater might be demanding from outside the door, in a gag that anticipates Portnoy’s Complaint by around 1,800 years.

The frontispiece to Richard Payne Knight’s An Account of the Remains of the Worship of Priapus showing waxwork votive offerings.

Reports on this intimate uncovering show that for all our modern sophistication we can still be as amazed as 18th-century dilettanti were by ancient erotic art. One article even asks: “Is this the first historical dick pic?” The short (or long) answer is no. The art found at Pompeii, buried about a century earlier, includes a fresco of Priapus, god of gardens and willies, weighing his enormous member in a set of scales. Doorways and gardens all over Pompeii were decorated with bronze phalluses hung with bells. These erotic wind chimes, called tintinabula, have been discovered throughout the Roman Empire.

Before concluding that all these massive penises on street signs, doors, in gardens and now, we know, public toilets embody the phallocratic arrogance of Roman imperialism, hold on to yourself a minute. Rome’s phallic art was preceded by that of ancient Greece. Greek vases are covered in “dick pics”. On a red figure vessel signed by the artist Douris in about 480 BC, satyrs are having a wild party. One of them rests his hands on the ground behind him while arching his body backwards so he can balance a cup on his erect penis. It’s amazingly lifelike – did any Greeks actually do this?

It’s not only satyrs whose genitalia are fully depicted. Statues of athletes and gods also sport their tackle. A famous bronze statue of Zeus or Poseidon shows his cock and balls to be as perfect as the rest of his powerful body.

In hand … a large hole where the penis was in the ancient Egyptian statue of the god Min, from 3300 BC. Photograph: Heritage Image Partnership/Alamy

By comparison, Egyptian art can seem coy, but that is an illusion. Later vandalism was to emasculate many Egyptian statues. In fact one of the earliest Egyptian deities, Min, was an “ithyphallic” being like Priapus who was portrayed with a huge erect member which he holds in his hand. Two of the oldest free-standing statues in the world, dating from about 3,300 BC, portray Min. They are in Oxford’s Ashmolean Museum. You can see the hole where his phallus was originally affixed.

Still further back in time, in the Neolithic era, an 11,000-year-old sculpture in the British Museum portrays two lovers entwined. Carved from the same stone, their tubular bodies and rounded heads are unmistakably phallic. Are they both men? Today, the museum includes this beautiful object on its LGBTQ tours.

The real question iswhat do all these willies mean? The toilet mosaic in Turkey shows that the Greeks and Romans could mock their own myths. It could also suggest a homoerotic atmosphere in this public convenience: another mosaic there depicts Ganymede, the boy loved by Jupiter, getting his body washed.

Or, just maybe, Payne Knight’s idea of a religious cult of the dick is less nutty than it seems. Narcissus in the mosaic holds his penis in his left hand, just like representations of the Egyptian god Min. In fact, the figure of the penile lovers in the British Museum was made in the Middle East when agriculture was evolving there. Perhaps all these priapic objects and images celebrate the seeding of the Earth.

One such relief in Pompeii was displayed outside a bakery. It is hard to think of Greggs using a cock and balls as its logo. The ancient world not only saw willies everywhere, but in a way that is hard for us to grasp. It’s tempting to identify the mosaics found in Turkey with graffiti in a modern toilet – but that equation is dead wrong. These are not furtive scrawlings but works of art provided by whoever built and ran the latrine. Imagine if today’s railway station toilets had photos by Robert Mapplethorpe on the floor and you might be getting warmer. Nothing makes us see the otherness of the past with greater sharpness than its most intimate images. Erotic art is history with knobs on.