There are two ways to look at this question - either relating to eggs in general or to the chicken egg specifically. Either way, the answer is the same: the egg came before the chicken. In the case of eggs in general, animals such as dinosaurs were laying eggs long before the modern chicken came into existence, meaning that in this sense, the egg predated the chicken by thousands of years. As for the chicken egg specifically, according to NPR's Robert Krulwich, the modern chicken was hatched from an egg, meaning the egg came first.
The key to understanding the answer, and indeed the question itself, is to understand what the question is getting at. The dilemma is to understand whether a chicken-like bird transformed into what is known as a modern chicken after being hatched or whether two chicken-like birds laid and fertilized an egg that then hatched a fully formed chicken. In this case, the latter option is the most realistic, therefore answering the question of which came first. Essentially, a bird that was similar to a hen and another bird that is similar to a rooster combined their genetic material, leading to a gene mutation that resulted in the chicken that is well known and loved today.