As mentioned Lenin and Ataturk were on good terms and during the 1920s Turkey was Soviet-aligned. It was Kremlin gold that helped Ataturk win the War of Independence, and followed by trade and non-aggression pacts, the Turks were surrounded by the old European enemies, and Imperialist-controlled Arab and Iranian puppet regimes. The Soviets were the closest thing they had to a friend.
However Stalin never forgave them for the 1936 Montreux Agreement which gave the Turks total control over the Bosphorus Straits, rather than joint priviledges for all Black Sea nations. Add to this German transports using the Straits without hindrance during WWII and Stalin basically loathed Turkey and was on the verge of invading in 1945/46, while Ankara offered them everything but outright submission to avoid it. The 'Straits Crisis' was the first Cold War tremor, as the Turks turned to the West for protection. By the 1950s, a decade of postwar bad blood led to Turkey becoming US missile base and staunch NATO ally.
This is a very easy thing to handwave. Have Stalin die from one of his many heart attacks in 1945. Whether its Molotov, Beria, Zhukov or whoever who takes over, there's no way they'll mess it up, only Stalin's herculean paranoia and resentment could accomplish what happened IOTL. Using their position in the Balkans and Caucausus as leverage, have the Soviets organise trade deals and certain amendments to the Montreux Agreement (things the Turks happily offered Stalin IOTL) and you'll have a happy friend. They wont join the WP or anything, but more likely Ankara will be a pro-Soviet member of the NAM, bit like India in some respects. This might lead the dominant Republican People's Party to adopt more socialist policies but I wouldn't push it too far.