In the beginning Piraeus was a islet, hence its name, “peraio” in ancient Greek means ferry across, so “peraiefs” was the the one ferrying across.
With time this was changed, since the void between land and Piraeus was covered by siltation and became a swamp and later on stretch of muddy land, in about the same period that the keen Themistocles foresaw its strategic importance, turn the attention of the Athenians to Piraeus and provided its fortification.
In 461 BC, Kimon began building the Long Walls that connected Piraeus with Athens, constructing the Northern or Faliriko Wall. With the Southern or Middle, Pericles completed the Walls, which were destroyed later on by the Romans. The big Attica port found its peak in the modern times of Greece, when in 1835, after the liberation from the Turks; the Municipality of Piraeus was created and was included in the program of constructing public buildings. ( source )