The Greeks were keenly aware of dialectal differences, and long before the Romans came on the scene, the Greeks had already categorized their dialects into three or four common groups: Ionic (with Attic a sub-group), Doric, Aeolic, and Arcadian. A great, free introduction to this is Buck's Greek Dialects (or here; the third edition is still under copyright).
You should realize that the word dialect itself comes from the Greek διάλεκτος, and was used in that sense in antiquity:
II. speech, language, Ar.Fr.685; “καινὴν δ. λαλῶν” Antiph. 171; δ. ἀμνίου, opp. τὰ ἔνδον δράκοντος, Hermipp.3; articulate speech, language, opp. φωνή, Arist.HA535a28; “τοῦ ἀνθρώπου μία φωνή, ἀλλὰ διάλεκτοι πολλαί” Id.Pr.895a6; but also, spoken, opp. written language, D.H.Comp.11.
2. the language of a country, Plb.1.80.6, D.S.5.6, etc.: esp. dialect, as Ionic, Attic, etc., Diog.Bab.Stoic.3.213, D.H.Comp.3, S.E.M.1.59, Hdn.Gr.2.932; also, local word or expression, Plu.Alex.31.
That these are understood as separate dialects and not individual languages is made clear by the Panhellenic tendencies of the Greeks, most succinctly put by Herodotus 8.144.2, when an Athenian embassy was beseeching the Spartans not to make a deal with the Persians:
For there are many great reasons why we should not do this, even if we so desired; first and foremost, the burning and destruction of the adornments and temples of our gods, whom we are constrained to avenge to the utmost rather than make pacts with the perpetrator of these things, and next the kinship of all Greeks in blood and speech, and the shrines of gods and the sacrifices that we have in common, and the likeness of our way of life, to all of which it would not befit the Athenians to be false.
By all accounts, the Spartans were Doric and the Athenians Attic-Ionic. The differences are stark, as anyone who has made the jump from reading Plato to reading Alcman will tell you. Yet they had a "common speech," which shows a clear awareness of dialects. This is also pretty clear from the fact that authors could switch dialects at whim: Athenian tragedians wrote the choral sections in a literary Doric dialect while the rest of the play is Attic.
When the Romans came onto the scene, it was obvious to all parties that Latin and Greek were distinct and not dialects. Cato would rail against Roman historians writing in Greek and instead wrote his in Latin. When the grammarians wrote on Greek dialects, they discussed unusual words and forms, but for the Romans like Cicero, they had to learn a new language with new letters, and were proud of it. Talking about "Greek" when referring to Homer, Sappho, Pindar, Herodotus, and Plato makes them all seem, to the Romans, one distinct language comprised of dialects that did not also include Latin. Quintilian (Inst. Orat. 12.10.34) remarks:
his ilia potentiora, quod res plurimae carent appellationibus, ut eas necesse sit transferre aut circumire; etiam in iis, quae denominata sunt, summa paupertas in eadem nos frequentissime revolvit; at illis non verborum modo, sed linguarum etiam inter se differentium copia est.
A still stronger indication of the inferiority of Latin is to be found in the fact that there are many things which have no Latin names, so that it is necessary to express them by metaphor or periphrasis, while even in the case of things which have names, the extreme poverty of the language leads us to resort to the same practice. On the other hand, the Greeks have not merely abundance of words, but they have also a number of different dialects (lit. "but even the language has an abundance of differences among itself").
This might seem obvious to us today, but it wasn't to all the ancients. In fact, there was an idea current in the first century BCE and later that Latin was after all Greek, specifically Aeolic. This was espoused most notably by Dionysius of Halicarnassus 1.90.1:
The Romans speak a language neither completely barbaric nor wholly Greek, but one mixed from both, of which the greater part is Aeolic
It should be noted, though, that Dionysius wasn't a grammarian, and well after comparative linguistics came on the scene, some people still claim unusual things about modern languages, from the easily confused (e.g. Aramaic is a dialect of Hebrew) to the bizarre (e.g. the idea that all Chinese languages are actually dialects because they're written using the same characters, which isn't even true at that!).
For a good article on the subject, check out Benjamin Stevens on Aeolism. I've posted the abstract below:
Aeolism, the idea that Latin is a dialect of Greek, was a matter of debate among a wide range of authors and readers in the Roman world. Often interpreted psychoanalytically, the idea is better understood as articulating a grudging ancient awareness that languages and social groups, including seemingly distinct groups like "Greeks" and "Romans," are in fact always "mixed," and thus that identity is a matter of fluid participation in shared social practices.
Even though Dionysius is clearly wrong, his claims still point to a clear understanding of the differences of languages and dialects. The latter, as its seen from both Dionysius' thoughts and from ancient Greek observations on their own language, are either due to mixing or just from differences over time (the Greek mythographers made the sons of Hellen Dorus (thus Doric among the Dorians), Aeolus (Aeolic) and either Ion (Ionic), or Xuthus, whose sons were Ion and Achaeus (which seemed to be a response to the early use of the Achaean ethnonym and the confusion about how to properly divide the mixed dialects of the north Peloponnese).