There really was a Bronze Age conflict which probably inspired Homer's epic.
Did any of the people in the story exist? No evidence for that exists. Did events happen as described in the story? Probably not, it was probably very embellished (like historical fiction movies/books). But we know from Hittite archives that there was a conflict between the city of Wilusa (the Greek name for Troy is Ilion, which is a cognate/loan word from the Hittite name for the city, Wilusa) and a people group called the Ahhiyawa (often identified as the Achaeans). The specific text refers to something called "the Wilusa episode" which involved hostility on the part of the Ahhiyawa toward Wilusa, which took place around the 1300s-1200s BC. All ancient textual indications and current scholarly consensus is that the Ahhiyawa are from the area of Greece/Mycenae.
The identification of Wilusa as Troy is also pretty sound, historically and archaeologically. All textual references that locate the city geographically put it in the area that the mound of Hisarlik sits, and there are mentions of such things as a water tunnel in Hittite texts, which have been found in excavation at Troy. So it's pretty well-accepted that Troy=Wilusa=Hisarlik.
So we know that there was a city called Troy, and a people called Achaeans, and that the Achaeans attacked the city of Troy. In addition, one of the kings of Wilusa mentioned in Hittite texts was Alaksandu, which is the Hittite version of Trojan prince Paris' birth name (Alexandros).
However, Homer wrote his epic centuries after it took place, between 1102 BC (Pseudo-Herodotus' date) and around 850 BC (Herodotus' estimation). We have no indication that it was intended to be an accurate retelling of events, or anything more than a fun imagining based around something that actually happened (like Inglourious Basterds and WWII, or "Cold Mountain" and the Civil War). All we know is that yes, there was a war, and the Achaeans attacked Troy, and that's about it.
For further reading, I suggest
Sagona, A G, and Paul E. Zimansky. Ancient Turkey. London: Routledge, 2009
Easton, D.F.; Hawkins, J.D.; Sherratt, A.G.; Sherratt, E.S. (2002). "Troy in Recent Perspective". Anatolian Studies (52): 75–109
Allen, Susan (July 1995). "'Finding the Walls of Troy': Frank Calvert, Excavator". American Journal of Archaeology 99 (3): 379–407
Wood, Michael (1985). In Search of the Trojan War. BBC Books; First Thus edition
Supporting u/kookingpot's excellent answer, it was likely based on real events. Although I've come to believe that it was likely based on regional conflicts between local pro-Hittite forces and local independent warlords. While a figure called the King of Ahhiya(wa) was mentioned, he was not Agamemnon leading a coalition, but a neighboring power-base who the Hittites dealt with when dealing with coastal Anatolian troubles.
When the Iliad was written down ca. 800-725^1 or 760-710^2 BCE, it had become a mixture of classical Greek ideology and literary skeuomorphs containing kernels of their late bronze age material culture. On one hand, the soldiers wore full armor, had boar tusk helmets, body-length rectangular shields, used chariots, and lived in cities with impressive walls. The story includes palaces, and royal women who live there and contribute to top-level decisions (in their own way) – all of which were aspects of the late bronze age world which were no longer prevalent ca. 8th century BCE (8th century Greek hoplite ). Yet, important details had been altered for their late iron-age listeners:
All of this suggests that the setting of the story had incorporated the late bronze age world, specific details had become mutable. Considering the story includes epic duels between famous warriors, gods manipulating nature to kill people, and Amazons, I would venture to say that much or all of the plot itself was entirely changed from whatever events occurred in the 13th century BCE.
In this hypothesis we are viewing its final oral iteration, winding the clock back to the 1200's BCE and the political situation in the Aegean is radically different from the one given in the catalogue of ships. The Aegean was a densely interconnected trading network of peripheral villages featuring hot-spots of dense urban cities which were all independent yet economically interdependent. There were many more villages than there were conurbations, such as in this map which shows the extent of Mycenaean culture and generally points to population density (likely most dense around Pylos, Mycenae, Achaea, and Boeotia. This map is more detailed, but strangely gives each city lots of surrounding territory and calls them states, all of which I think is suspicious.
While some scholars suggest that Ahhiyawa could refer to a coalition of powerful city states^4, to my knowledge there's no wide ranging stamp seal which would indicate administrative control, and there's no 'large Mycenaean state' seen in Linear B texts^4. The King of the Ahhiyawa, while easy to identify with Agamemnon, may simply be a Mycenaean potentate who helped the Hittite king return a troublesome warlord. When fit into its context, I'd suggest that the language was more posturing than political reality.
Whereas the Mycenaeans were made up of powerful city states (with or without a coalition), western Anatolia was made up of smaller kingdoms or coalition-kingdoms. These were constantly rebelling from central Anatolian Hittite control and seemingly constantly being put back in line by the state.
During this period, Wilusa (Troy) was conquered by the Hittite King Tudhaliya I (ca. late 1400's-mid 1300's BCE), and likely participated in much local intrigue etc until it gave soldiers to Muwatalli's campaign at the battle of Qadesh (ca. 1274). Later in the century, it was sacked twice (ca. 1250 and 1210) both showing violence (sling bullets and arrowheads lodged in its walls)^3. Possibly one of these events spawned the Trojan war mythos.
At some time during the reign of Muwatalli II (early 1200's BCE), a local warlord named Piyamaradu (or Pariyamaradu) took control of Wilusa from the Hittite appointed king. Not only did he do this, but it was done in collusion with the Mycenaean city-state ruler of Atpa (Atapa, or Ephesus, which was a powerful Mycenaean city in Anatolia). This action had deposed the rightful Hittite vassal Manapa-Tarhunta, who held the Seha River Land in the name of the Hittite king (northwestern Anatolia, which included Wilusa). From his pinnacle of power, the warlord Piyamaradu raided Lukka (a Hittite vassal in southwestern Anatolia) and ended up raiding Ahhiyawa lands as well^5.
When the Hittite king (and army) finally come to reassert control, they retake the city and then Piyamaradu is found sheltering at Millawanda (Miletus, the most powerful Ahhiyawan city-state in Anatolia). Sensing he was not safe even there, he ended up then fleeing to “Ahhiyawa land” with 7000 prisoners. From there, we do not know what happened to him^5.
Confusingly there was another rebel/warlord figure named Piyama-Kurunta who (a few decades earlier in the late 1300's BCE) had similarly fled into Ahhiyawa territory to escape the Hittite king's wrath, only to be handed over to the Hittite king by the Ahhiyawan king^6.
Considering this evidence, I think it is likely that many of these 14th/13th centuries BCE details became conflated with other pieces of information, eventually turning into a story involving iron-age Greek culture heroes (without even mentioning the Hittites). There are some similarities between real life and the Iliad, such as the names Alaksandu (a mid-13th century ruler of Wilusa), Piyama-Kurunta, and Piyamaradu/Pariyamaradu, as well as the city's two destruction layers ca. 1250 and 1210 BCE. While there is not evidence of a Greek coalition to invaded Wilusa, there was certainly a connection between Greece and Anatolia in the late bronze age...
Achaean Greeks were closely involved in the political and military affairs of western Anatolia, particularly in the thirteenth century. During this period the Hittite vassal state Wilusa was subjected to a number of military actions in which Achaeans may have been directly or indirectly involved. On one or more occasions its territory was perhaps occupied by outside troops; on one or more occasions its king was dethroned^3
References -