In your example, you can not leave out the es.
Troja hat wirklich gegeben
is not a "complete" sentence.
It is a reordered version of
Es hat Troja wirklich gegeben
and you can not leave the es out here either. This is because Troja in this example is not the subject of the sentence, but really an accusative object. This is different to
Troja hat wirklich existiert
where Troja is really the subject of the sentence.
It is a bit like asking whether you can omit the there in
There was a time when I spoke no German at all
Maybe the problem is the difference between the English an German way of saying it. In English you'd say:
Troja really existed
which would translate to
Troja existierte wirklich (or more colloquially: Troja hat wirklich existiert)
In this case, Troja is the subject of the sentence.
The German
Troja hat es wirklich gegeben
would translate to
There really was Troja
which nobody would say in English, but the expressions are equivalent.