The ancients had an extremely limited scope of historical data about themselves. For example, the Greeks believed that they were descended from northern invaders known as the Dorians which we today know to be false. Did any ancients ever discover an object which went against their historical record and did it ever force them to rethink their historical past? Is anything like this recorded anywhere?
The Babylonians had a museum, with ancient (to them) artefacts that were labeled in three languages. The items found were not very showy (broken statued, bits of ruins), so I think we see the understanding of deep time, and that they had some understanding of a history of these items. I don't know how they interpreted these items, but it's pretty certain that the artefacts fit the history they wanted to tell. Even today, various *isims colour how findings are interpreted. Without the modern scientific foundation of archeology, I would think that various things dug up by farmers and found by shepherd boys would probably be fit to the narrative, rather than challenging it.
In her book The First Fossil Hunters: Paleontology in Greek and Roman Times Adrienne Mayor argues that Mammoth skulls were the origin of the Greek myth of the Cyclopes.
There were certainly Mammoth relatives in what we would consider Greece and the Greek Islands millions of years ago, and we still find their fossils in that area today. Mayor argues that it is inevitable that the Greeks would find them as well.
She believes that the large hole in the skull for the trunk was misinterpreted by the discoverers as a single eye socket, and thus the myth was born.
There are stories of the Greeks occasionally doing things that look frankly more like grave robbing than archaeology, but it's close. For instance, Herodotus says the Spartans once found themselves in a spot in their war against Tegea, and made a determined search to find the bones of Orestes and bring them to Sparta - only after that could they win the war. The story is rather lengthy. You can read it in book 1 around chapter 67.
The short version is in their search they got an oracle from Delphi describing the tomb in code, and one Spartan participating in this search learned that in Tegea there was an ancient tomb, but the occupant was unknown, and the description matched the description in the oracle, so he dug up the tomb and took the bones home.
There is a similar story in Plutarch in which the Athenians were told to find the bones of Theseus:
And after the Median wars, in the archonship of Phaedo, when the Athenians were consulting the oracle at Delphi, they were told by the Pythian priestess to take up the bones of Theseus, give them honourable burial at Athens, and guard them there. But it was difficult to find the grave and take up the bones, because of the inhospitable and savage nature of the Dolopians, who then inhabited the island. However, Cimon took the island, as I have related in his Life, and being ambitious to discover the grave of Theseus, saw an eagle in a place where there was the semblance of a mound, pecking, as he says, and tearing up the ground with his talons. By some divine ordering he comprehended the meaning of this and dug there, and there was found a coffin of a man of extraordinary size, a bronze spear lying by its side, and a sword. When these relics were brought home on his trireme by Cimon, the Athenians were delighted, and received them with splendid processions and sacrifices, as though Theseus himself were returning to his city. And now he lies buried in the heart of the city, near the present gymnasium, and his tomb is a sanctuary and place of refuge for runaway slaves and all men of low estate who are afraid of men in power, since Theseus was a champion and helper of such during his life, and graciously received the supplications of the poor and needy.
Obviously neither of these happened, but it shows Greeks were aware of an older world and could imagine excavating ancient tombs with obviously different cultural remains.
There is also the purification of Delos in 426 BCE, in which Athens dug up every body on the island and re-interred them on another island. That IS historical, and my archaeology prof says it's one of the only absolutely rock solid dates we have; any burial on Delos we find now HAS to be after 426.