Latin and Greek share a common ancestor, Proto-Indo-European, which scholars believe was spoken in the 4th millennium BC or earlier, and then began diverging into separate languages by 3500 BC. Many PIE children have been identified:
- ... and others
Linguists can reconstruct PIE with some precision based on the common features of its child (and grandchild) languages. Then, by examining how each individual language diverges from the "standard" or "original" PIE language, the languages can be categorized and their development traced.
The search for "relatives" of Latin has gone on for a long time, and Greek has often been proposed. However, modern scholarship does not see a close connection between the two. Clackson and Horrocks write:
The IE language groups which we know to have been spoken adjacent to the Latin speech area in historic times are Germanic, Celtic and Greek. In the nineteenth century scholars grouped Latin closest to Greek and Celtic. [...] It later became apparent that the features shared by Latin and Greek reflected common inheritances from the parent language, lost in other IE languages, rather than new developments, and were thus not significant for their relationship.
That is, most of the original similarities between Latin and Ancient Greek are due to them having the same ancestor, centuries prior, and not due to "borrowing" occurring between them. In fact, if we must select the closest relative to Latin, it would not be Greek:
Latin shares more features with Celtic than any other IE language branch outside Italy.
For much more on the story of this development, see Clackson and Horrocks, The Blackwell History of the Latin Language (2007), chapters 1 and 2.