It is known that the first settlers of Sitges were nomads who lived by hunting and fishing. A Neanderthal jaw found in the Cova del Gegant in the 1950's dates back 53,200 years and is one of the oldest human remains in Catalonia.
The archaeological remains found in the vicinity of the Parish and town hall, show that the area was occupied continuously from the sixth century BC to the first century AD. Excavations show that there was a Roman villa in the Vinyet area between the first and third century AD. The meaning of the name Sitges ("sitja" in Catalan), comes from silos, deep pits in the ground used for grain storage and suggests this could have been an area where these underground silos were frequent. In the eleventh century AD there was a castle in Sitges however there are no visible remains and its site is where the town hall stands today. Other small castles were built in the same century throughout the territory of Penedés and Garraf and hamlets grew around them in Olivella, Cubelles, La Geltrú and Ribes. The castle of Sitges, the fortified towers & stables of Miralpeix, Campdàsens and Les Botigues de Sitges were under the control of Ribes castle whereas the castle of Garraf was under the rule of Eramprunyà castle. What is today the municipality of Sitges, was never governed under a single feudal lord.
In the fourteenth century, the "seigneur" of Ribes ceded the castle and domain of Sitges to a family that, two centuries earlier, had adopted the name of the ceded territory. In 1308 Agnés of Sitges sold the rights to Bernat de Fonollar who was lord of the castle until 1326. Bernat of Fonollar was the right-hand man of King James II the Just and became the most important man in the history of medieval Sitges. Bernat de Fonollar founded the hospital of Sant Joan Baptista in 1324. He died without heirs (his tomb is at the Altar of the Souls in the parish church) leaving his estate to the Pia Almoina, a charitable institution run by the See of Barcelona. Other lords or "seigneurs" claimed rights over the territories held by Bernat de Fonollar however after litigation the Pia Almoina was recognized as the owner of the castle and the territory of Sitges. The Pia Almoina had to continue to fight lawsuits for another 300 years, brought against them by the "Universitat Sitgetana" (essentially the Sitges town hall which by then already included Garraf, Miralpeix and Campdàsens), who wanted to depend and report directly to the crown. Sitges lived turbulent times during the seventeenth and eighteenth centuries due to the consequences of war: at the beginning of the conflict between France and Spain (1640-1659), 600 Neapolitan soldiers from Felipe IV of Spain's army overran Sitges and stole everything they could. In 1649, the town of Sitges came under siege for two days, suffering bombardment by land and sea and looting by the Castilian troops of Juan de Garay (viceroy of Catalonia). This attack caused extensive damage to the town, as well as the collapse of a section of the wall, two towers and part of the castle, which was not to be rebuilt until 1681.