As you interact more and more with a Gym in Pokémon GO – through battling in the Gym, defending the Gym for certain periods of time, or by giving Pokémon treats – you’ll receive recognition in the form of a Badge. Badges have four tiers: Basic, Bronze, Silver and Gold. You’ll unlock new tiers as you interact more with the Gyms. As a reward for your frequent interactions with a Gym, your badge will earn you bonus items when spinning the Photo Disc. To view your Badges:
- In Map View, touch the Trainer Profile icon.
- Scroll down to the Gym Badge section.
- Touch the List button to see a full listing of all your Badges.
- Touch any Badge to view details about your interactions with the Gym.
- You can also view all your Badges displayed on the globe using the Badge Map button.
Source: Official Pokémon GO blog