He had to have arrived by 3 o'clock yesterday.
Is it grammatically correct? What does it mean?
He had to have arrived by 3 o'clock yesterday.
Is it grammatically correct? What does it mean?
The sentence is fine. To know what it means requires more context, because HAVE to, like must, may have two senses, which linguists call deontic and epistemic.
The deontic sense denotes a strong obligation or requirement—stronger, for instance, than should or ought to:
The official rules required that he had to have arrived by 3 o'clock yesterday in order to run in the race.
The epistemic sense denotes an inference of logical necessity.
He ran in the race, so he had to have arrived by 3 o'clock yesterday.
The sentence that you posted above is gramatically correct, but wouldn't usually be used on its own like that. Usually, the construction "had to have verbed" indicates an implication of the fulfillment some condition. For example, "He had to have arrived by 3 o'clock yesterday, because he was done with the 30-minute job by 3:30." Another example: "This has to have been the right restaurant because John found what he was looking for here."