What ties different eras such as the ancient, medieval and early modern periods together into one Western Civilization?
The most important thing that ties all of these periods together is geographical location. When we talk about Western Civilization, we are talking about civilization in Europe. We do talk about places like Egypt that are not part of Europe, but we talk of them mainly in how they have affected civilization in Europe.
We can look at other things that tie Western Civilization together to some degree. These include science and the idea of individual rights. At least since the time of the Greeks, Western Civilization has been characterized by an attention to science as opposed to a reliance on supernatural explanations for natural phenomena. This attention has waned at times but has always been present to an important extent. Also since the time of the Greeks, Western Civilization has believed to some extent in the idea of individual rights. This has distinguished it from many other cultures.
So, what ties these eras together is mainly geography, but is also ideas like science and human rights.