The "gc" stands for garbage collection. Executing git gc is literally telling Git to clean up the mess it's made in the current repository.
Learn more about git gc here