In my opinion, Mikhail Gorbachev deserves enormous credit for both the peaceful ending of the dictatorship and cold war and the decline and collapse of the Soviet state because I cannot imagine one happening without the other. Moreover, the see the decline and collapse of the USSR as having been an overwhelmingly positive thing, even if events since then for Russia and the other constituent republics have often been difficult. Gorbachev sought to dismantle the system more cautiously and slowly, so the chaos and anarchy that erupted in some places cannot, in my opinion, be blamed on him.
Regarding Gorbachev’s most positive accomplishment, I believe that it was ending the Soviet intervention in Afghanistan. With literally no end in sight for the Soviet troops fighting there, growing discontent over the war among the Soviet public – particularly among the USSR’s Muslim ethnicities – and the monumental cost of the intervention with little or no gain, it is frankly amazing to me that Brezhnev persisted in the war for as long as he did, although the U.S. record in its own intervention in Vietnam left at least as much to be desired.
Regarding Gorbachev’s worst miscalculation, I think his failure to assess his opponents within the Soviet government was the chief issue. While it certainly could not have been easy to manage criticism from his left from the entrenched interests of the military and security apparatuses and, at the same time, more right-wing pressure from the likes of Boris Yeltsin, a more savvy politician might have been able to insulate himself sufficiently from the sorts of threats that these groups posed and prevented the August 1991 coup and the rapid deterioration of his power that followed. More importantly, better management of the political terrain might have allowed Gorbachev to control the final collapse of the USSR more competently, thus perhaps averting some of the tragedy that has since ensued.