Venice had an innate, and enormously differentiating, environmental determinant: its lagoon, that is to say the hundreds of square miles of brackish water that separate Venice from the Italian mainland, connected to the sea by three narrow channels. I've written about it several times, you can read about Venice's early Economic development in a rambling answer here, Venetian conflict resolution in an equally rambling answer here, and a description of the Republic at its height here. There's also this other answer of mine examining geographic, political, and social determinants of Venice's success with long-winded and detailed examples.
There are two sides to the Venetian lagoon's impact on Venice's success of a polity. The first, and most evident, is the fact that the community was fundamentally unassailable until the development of long-range gunpowder artillery. Even when, as in the wars of the thirteenth century, Genoese ships were able to break into the southern end of the lagoon, these warships would only run aground in the shallow waters. Similarly, time and time again landward assailants would find themselves with little to do but shake their fists at the Venetians from the shore. It is the lagoon, and the seafaring customs it begat, which kept the Venetians more connected to the wealthy Empire of Constantinople in the east than the turbulent Empire of Charlemagne in the west. Over the course of bitter struggles with the nearby communities of Grado, Padua, and Verona, the lagoon also gave the Venetians another advantage: Northern Italy's inland waterways reach the sea in or near the Venetian lagoon, laying the foundation for Venice's commercial domination over those waterways, which would then morph into political control as confrontations with neighbors were invariably concluded in Venice's favor. No other Italian city had the advantage of multiple routes into Italy and Central Europe. Genoa, while able to extend its domination on minor cities and towns of the Ligurian coast (that is to say, places to which it had a maritime connection) had no comparable advantageous connection to the Italian interior and thus more difficult connections to the nodes where goods had to be unloaded from rivers to cross the Alps (although the Genoese, conscious of this, compensated by expanding their commercial interests in Europe through other nodes like Marseilles and Seville). Pisa too, while at the mouth of the River Arno, had only one upriver neighbor (Florence) which which it developed a contentious relationship, as well as no natural conduit to carry goods into central and western Europe.
The second advantage intrinsic to the lagoon is somewhat more nuanced. The nebulous notion of the "Lagoon as Polity" with which Venetians defined their early political organization is as is difficult to understate as it is difficult to put into words. With the Rialtine Islands on which the modern city of Venice stands only recognizably developed in the eleventh century, Venice's early political organization was formed with the goal in mind to bring stable government to the various communities on the lagoon's islands. This meant that in addition to being the middlemen between trade of goods between eastern and western mediterranean, Venice also possessed an internal economy characterized by stable trade between low-density lagoon communities. Further, this also meant that the Venetian political organization was set up to balance the needs of a geographically diverse set of communities with different political preferences and goals. While the Venetian system would morph into an aristocratic oligarchy, the early checks and balances put in place allowed for stable system of government that while grossly imperfect, was much more inclusive than that of its neighbors and would come to govern the whole of Northeast Italy very successfully.
I would also like to add onto /u/AlviseFalier and /u/labarge3 answers regarding the topic and discuss how Venice's diplomatic manoeuvring with the Byzantine Empire was key to its survival and subsequent dominance of the Mediterranean. Despite being considered a subject of the Byzantine Empire, Venice remained autonomous and operated entirely for its own gain. This once symbiotic relationship would be exploited by the Republic of Venice and would emerge as one of the powerhouses of the Mediterranean. One such example was Emperor Alexios I (r. 1081-1118) awarding the Republic a chrysobull (golden bull) in return for naval support. According to Anna Comnena's Alexiad;
He [Alexios I] paid their services by liberal gifts and preferments, and honoured the Doge of Venice with the title of 'Protosebastos' with the salary attached, and on the Patriarch he bestowed the title 'Hypertimius ' with its corresponding salary. Moreover he decreed that a large sum of gold should be apportioned yearly to all the churches in Venice from the royal treasury, and to the church named after the evangelist and apostle Mark he made all the shopkeepers in Constantinople, who were natives of Amalfi, pay tribute. He also gave the Venetians all the wharfs running from the old Hebraic anchorage to that called Bigla and all the anchorages between these two, as well as much real property, not only in the capital and in the town of Dyrrachium, but wherever they asked for it. But greatest gift of all, he ordered that their merchandise should not be taxed in any of the countries under Roman sway, so that they could trade freely where they liked, and not pay even an obol [a silver coin], neither for customs nor for any other tax required by the Treasury, but should be exempt from all Roman authority.
Such a reward would become standard for the Empire's handling of Venetian loyalty. Additional bulls and other such trade deals would be made throughout the years. Venice would assist in the defence of the Empire and the Empire would shower them in lavish trade deals. Constantinople was the most important port in the Mediterranean and the Venetians had a monopoly on it. Eventually other Italians would arrive to reap the benefits within the city, however it was the Venetians that would hold the lion's share of the wealth. This relationship would eventually sour - the Byzantines had effectively destroyed its own economy though its dealings with the Italians, and the cultural and religious differences between the Italians and the Byzantine inhabitants caused a schism between the two. This schism would ultimately end the 600 or so year relationship between Republic and Empire, resulting in the events of the Fourth Crusade and Venice emerging from the shadow of its former suzerain.
Hopefully this makes sense, this is basically a TL;DR of my thesis I wrote a couple years ago. Also hopefully this is a suitable comment for AskHistorians, this is my first time posting about stuff I think.
Some of the primary sources I used for examining the relationship between Venice and the Byzantines:
Anna Comnena. The Alexiad. Translated by Elizabeth A.S. Dawes. London: Penguin Books, 2015.
John Kinnamos. Deeds of John and Manuel Comnenus. Translated by Charles M. Brand. New York: Columbia University Press, 1976.
Niketas Choniates. O City of Byzantium. Edited by Harry J. Magoulias. Detroit: Wayne State University Press, 1984.
Some secondary sources I'd recommend:
Madden, Thomas F. Enrico Dandolo & The Rise of Venice. Baltimore, John Hopkins University Press: 2006.
Madden, Thomas F. Venice: A New History. London: Penguin Books, 2012.
Nicol, Donald M. Byzantium and Venice: A Study in Diplomacy and Cultural Relations. London: Cambridge University Press, 1992.
Norwich, John Julius. A History of Venice. London: Penguin Books, 2012.
Norwich, John Julius. Byzantium: The Decline and Fall. New York: Knopf 1995.
Norwich, John Julius. Byzantium: The Apogee. New York: Knopf, 1992.
Genoa gets a lot less credit than it deserves, in part, I suspect, because it keeps its treasures well hidden. Who can resist canals? Or St. Mark’s Square? Genoa’s rather more robust, if less beguiling.
Even before the first crusade, the Genoese were taking control Corsica and much or Sardinia. In the first crusade, they expanded their influence into the Holy Land and far into the Black Sea. They settled colonies inthe Aegean (Samnos, Lemnos, Lesbia, and msot of all Chios). Their back and forth problems with Venice over the coming centuries were of course problematic, and yes, the Genoese fleet did blow it at the battle of Chioggia at the entrance to the Venetian lagoon. That, combined with Genoa’s importing the Black Death put a great deal of pressure on Genoa (though it’s not as if Venice came out unscathed either). Venetian ships did trade int he western Med, but to the best of my recollection, they did not attack Genoa itself.
So as we head into the sixteenth century, the trade routes over the Ottoman empire became less crucial. By then, with Portugal having bypassed the middle east by sailing around Africa and Spain having come to the New World, Genoa having lost its eastern colonies to the Ottomans, Genoa turned its attention west and with money accrued over the ages they became bankers of resort to Spain.
That’s the short version. More can be read in
Philip P. Argenti, Chius Vincta or the Occupation of Chios by the Turks (1566) and Their Administration of the Island (1566–1912),
Steven A. Epstein (2002). Genoa and the Genoese, 958–1528.
See also the works of Giiuseppe Felloni http://www.giuseppefelloni.it/en/ghf_chapter11.php
Related question if such are allowed: were there any significant political/ideological differences between the various Italian merchant-dominated republics of this era?