The forerunner of the modern state of Turkey was the Ottoman Empire which for centuries controlled vast swathes of eastern europe to the point that it borded Austria. The 1800s can be viewed as period characterised by the Empire's decline with uprisings and independence movements rising in Grecce, Bulgaria, Romania and Serbia. One of the major international diplomatic issues of the era for the European powers is how to deal with the decline of the Ottoman Empire as a great power (which at the time became the first state to be called 'The Sickman of Europe'). The other great powers (particularly Russia and Austria-Hungry) were lock in a battle to gain control and infulence over the areas where the Ottoman's power was wayning or new states were emerging (The Crimean war is one of these such battles and Russia & Austria-Hungary's power games for infulence over the area are one of the myriad of causes for WW1).
Basically Turkey is considered European due to the fact as the Ottomans they were a Europen Great Power for centuries. Also if you compared the declining power of the Ottoman Empire to the rising power of the US, the Ottoman Empire is still considered to be the greater power of the two right up until the end of the 1800s.
After defeat in the first world war and subsequent occupation In the modern state of Turkey was formed in 1923 after the Turkish war of Independence while the allies carved up the rest of the empires teritory into the modern states you find today. And much like how Germany was acepted the sucessor state to Prussia Turkey was accepted as the sucessor state of the Ottoman Empire.
Kinross, Patrick (1977). The Ottoman Centuries: The Rise and Fall of the Turkish Empire would be a good place to start if you want to know more.