The move comes only a week after Ankara called home its ambassador to the United States because a US congressional committee approved a similar resolution.
European Union member Sweden has been one of the strongest supporters of Ankara's bid to join the bloc, while the United States is generally considered a strong western ally of the NATO-member Turkey.
The issue of the Armenian massacres is deeply sensitive in Turkey, which accepts that many Christian Armenians were killed by Ottoman Turks but vehemently denies that up to 1.5 million died and that it amounted to genocide - a term employed by many Western historians and some foreign parliaments.
"We strongly condemn this resolution, which is made for political calculations," Turkish Prime Minister Tayyip Erdogan said in a statement, referring to the Swedish parliament vote.
"It does not correspond to the close friendship of our two nations. We are recalling our ambassador for consultations," Erdogan said, adding that he was canceling a Turkey-Sweden summit scheduled for March 17.
The Swedish resolution passed by an extremely narrow margin, with 131 parliamentarians voting in favor and 130 against.
Another 88 members of parliament were absent.
The measure was opposed by Sweden's center-right coalition government, but three of their parliamentarians voted in favor of the motion, helping the opposition get it through.
Swedish Foreign Minister Carl Bildt said in a blog post that the vote could complicate efforts between Turkey and Armenia to normalize relations after a century of hostility.
The countries agreed last year to establish diplomatic ties and open their border if their parliaments approved peace accords, but the votes have not taken place and the governments have accused each other of trying to rewrite the texts.
"The decision also doesn't help the debate in Turkey, which has become all the more open and tolerant as it moves closer to the European Union and resulting democratic reform," Bildt said.
Zergun Koruturk, Turkey's ambassador to Sweden, told Swedish television program Aktuellt that the vote would have "drastic effects" on bilateral relations which were unlikely to be overcome in a short time.
"I am very disappointed," Koruturk said. "Unfortunately, parliamentarians were thinking that they were rather historians than parliamentarians, and it's very, very unfortunate." A Turkish government source, however, told Reuters that Koruturk would probably return to Sweden soon.
"We know the Swedish government has been very active in trying to stop this resolution," the source said.
Turkey has signalled that its ambassador to the United States will not return until the fate of the non-binding congressional resolution, which also passed by a razor-thin margin, is clear.
The administration of President Barack Obama has vowed to stop the resolution from going further in Congress in a bid to limit the diplomatic fallout. Turkey is crucial to US interests in Iraq, Iran, Afghanistan and the Middle East.