Venice didn’t appear out of nothing – there was something before which led to the Venice we know as the Serenissima.
Venice was an independent state for almost a millennium, but it might note have been. It all hinged on a single battle fought in the Venetian lagoon in 810.
In late Antiquity the north-east of the Italian peninsula suffered many invasions. The wars caused people to move to the safer lagoon areas, and hence to the foundation of Venice.
The Birthday of Venice of is traditionally on March 25th, 421 CE, but this is far more legend than historical truth.
Recently discovered frescoes in the church of Torcello, former seat of the bishop, attest the close connections early Venice had to the Caroligian empire.