Gandalf is more or less a demigod/angel with a sort of focus on wisdom and a particular interest in the importance of the overlooked “common people” of Middle Earth, so it wouldn’t be that surprising, I guess, for him to have a magical insight into the value of the Shire.
Given that he tends see overlooked value in these common folks, it does seem wildly out of character that he would compare the value of their entire little community to a piece of armor, however fine. Although, I guess, it isn’t like he’s rubbing it in Frodo’s face or anything. I guess he just wanted Gimli to appreciate the value of the gift…