The group said in a statement it was carried out by "a heroic soldier".
At least 600 revellers were celebrating in the early hours of Sunday at Istanbul's Reina nightclub when the gunman began firing indiscriminately.
The gunman is still believed to be at large and a manhunt is under way. Police say they have made eight arrests so far.
IS has been blamed for recent attacks in Turkey, which is taking military action against the group in neighbouring Syria.
The militant group has already been linked to at least two attacks in Turkey last year.
The IS statement accused Turkey of shedding the blood of Muslims through "its air strikes and mortar attacks" in Syria.
Turkey launched a military operation in August aimed at pushing back IS and Kurdish forces, with some of the most intensive recent fighting against IS around the northern town of al-Bab.