Back in the days of Mesopotamia and Egyptian winemaking, the winemakers saved their wares in amphorae - clay flasks.These were stamped with the vineyard's name, the vintage of the wine, type of wine, and so on. This went on for thousands of years, through the Grecian days of wine trade, until the Romans grew to power.
The Romans, amongst other things, developed glass blowing. Glass was quickly found to be a good medium for storing wine - it did not affect the wine's flavor, you could easily see what wine was inside the bottle, and so on. The trouble was with the method of manufacture. Glass at the time was hand blown, and bottles therefore varied wildly in size. Consumers never knew exactly how much wine they were getting.
For a while, wine was illegal to sell in bottles because of these problems. Instead, consumers would bring in their own containers, and a measured amount of wine would be put into that container. Think of it as buying meat at a meat counter - you watch it get weighed and measured, and then you take it home in your own bag.
Time went on, and colored glass and various sizes and shapes were experimented with. Bottles originally were onion shaped, as this was easy to blow, but it was found that a longer, flatter shape was better for storing wine on its side, which helped it age properly and keep the cork wet. Bottles ended up being around 700ml to 800ml as an easy to carry size that was also able to be made easily.
In the 1800s the industry found ways of making standard sized bottles, and regions began to settle on what they found was the ideal bottle size for their wines. Some chose 700ml, others 750ml, and so on. The maximum "standard" bottle size was around 800ml, although magnums and other special sizes did exist.
Up until around 1945, wines from Burgundy and Champagne often came in 800ml bottles, with various other similar sizes used for other regions and countries. Beaujolais was known for its 500ml "pot".
In 1979 the US set a requirement that all bottles be exactly 750ml as part of the push to become Metric. That is almost exactly the same amount of alcohol as an "American Fifth". Around the same time the European Union also asked winemakers to settle on one size to help with standardization. The 750ml size has become adopted by many countries, so the winemakers could ship to the US with ease.