The Maharsha (Rosh HaShana 18b, s.v. U'mee harago)1, on the premise that Gedalya was in fact righteous, addresses the remaining question of why, if HaShem considers the death of a righteous person to be as calamitous as the burning of the Temple, we only have a fast day to commemorate Gedalya's death and not the death of other righteous people.
The Maharsha answers that the day that Gedalya was killed is exceptional since he was murdered by Yishma'el, a fellow Jew, during the Ten Days of Repentance (when Jews should especially repent and certainly not commit grievous sins as did Yishma'el). More significantly, as a result of Gedalya's death, the Jewish people remaining in Judea fled from the Land of Israel to Egypt, transgressing Yirmiyahu's warning that they would be annihilated if they did so (Yimiyahu 42:7-22).
To quote R' Eliyahu Kitov: "With Gedalyah's death, the last ember of Jewish autonomy in the aftermath of the destruction of the first Beis ha-Mikdash was extinguished. Thousands were killed, and those who remained alive were driven into exile.... Thus, the remnant that had been left in the land was dispersed and the land was left desolate" (The Book of Our Heritage, vol. 1, pp. 47-48).
Nonetheless, although we fast over the tragedy caused by the death of Gedalya, the fast is named after him to illustrate the point made by the Talmud in the passage to which you refer (Rosh HaShana 18b), that HaShem considers the death of the righteous to be as serious as the burning of the Temple. As the Maharsha notes, it is impractical to fast over the death of every righteous person, since that would require a daily fast. However, since we fast anyway, the fast is named such as to show us that it is theoretically fitting to fast over the death of the righteous just as we actually fast over the destruction of the Temple.
I'll leave it to another poster to address the question of Gedalya's personal righteousness.
1: About midway down the first block of text, towards the end of the line.