Since the last update you can now obtain a badge for a specific gym when you spin its photo disc. It is then possible to level it up by defending it, feeding the Pokemons from your team with berries or attacking it if another team is controlling it. Leveling the badges up apparently awards you with a new badge rarity, going from Bronze to Gold, as you can see from the picture below.
Does the rarity of a badge affect the gym it's linked to? For instance, can you get additional loots, or will your own Pokemon's motivation decrease more slowly?
Best Answer
Leveling the Gym badge does have an affect on the game play. According to Niantic's post:
Having a higher Gym Badge level will yield more rewards and bonus items from Gyms. At the moment, this appears to be the only thing that the Gym Badges do that I can find.