At a business event in Istanbul, Erdogan said Turkey had made a "huge effort" to prevent such incidents but that the limits of its patience had been tested after repeatedly warning Russia about air space incursions in recent weeks.
"Nobody should expect us to remain silent against the constant violation of our border security, the ignoring of our sovereign rights," Erdogan said.
Turkey has been angered by Russian air strikes in Syria, particularly those near its border targeting Turkmens, who are Syrians of Turkish descent.
Russia made clear it could target Turkey economically.
"The direct consequences could lead to our refusal to take part in a whole raft of important joint projects and Turkish companies losing their positions on the Russian market," Medvedev said in a statement.
Russia is a major exporter of grain and energy to Turkey, and sends over four million tourists each year to Turkish resorts, second only to the number of German tourists.
The Russian government has already said it will discourage Russian tourists from travelling to Turkey, though the immediate impact will be limited because Turkey is now in the off-season.
But while Russia may mothball deals with Turkish firms and curb imports of Turkish goods, it is unlikely to let the fallout affect energy exports that are the core of their economic relationship.
"Erdogan is a tough character, and quite emotional, and if Russia pushes too far in terms of retaliatory action, I think there will inevitably be a counter reaction from Turkey (like) tit-for-tat trade sanctions, perhaps extending to things like the Russia nuclear deal," said Nomura strategist Timothy Ash.
"But I think there is also a clear understanding that any such action is damaging for both sides, and unwelcome. The ball is in Russia's court now," he wrote in a note.