The gun that Atticus uses symbolizes his masculinity to the children, Jem in particular, for up until this point they considered their father "old" and not like other fathers in the town. Thus, they are impressed when they discover he knows how to use it, but does so only when necessary for he gave up hunting long ago. We also learn later in the story (Chapter 21), after Atticus loses in the trial, that it represents the law, with the mad dog representing racism. We see this when Scout says, "it was like watching Atticus walk into the street, raise a rifle to his shoulder and pull the trigger, but watching all the time knowing that the gun was empty."
The gun represents unfairness. When Atticus doesn't want to shoot the dog, his peers force him to. He thinks he has an unfair advantage over the animal because he has a gun. That is also why he gave up hunting.