At the end of Chapter 10, Jem tells Scout that, "Atticus is a gentleman, just like me!" Jem is referring to the fact that Atticus would not brag about being the best shot in Maycomb County. Jem infers that gentlemen do not brag; they just do what needs to be done. This is not what Atticus tells Jem directly about being a gentleman but it segues into the following chapter.
In Chapter 11, Jem and Scout are scolded and insulted by Mrs. Dubose and Jem retaliates by cutting the tops off of all her camellia bushes. Mrs. Dubose has Jem read to her for a month as punishment. At the end of this chapter, Atticus reveals that his plan was for Jem to learn what real courage is (and this kind of courage is relevant to being a gentleman).
I wanted you to see something about her—I wanted you to see what real courage is, instead of getting the idea that courage is a man with a gun in his hand. It’s when you know you’re licked before you begin but you begin anyway and you see it through no matter what.
This was Atticus' lesson about courage. And in this situation, the gentlemanly thing to do is to act with kindness even when someone (i.e., Mrs. Dubose) is being difficult. Atticus practices and preaches this as a general rule but in this situation with Mrs. Dubose, Atticus makes a special point to educate the children about considering Mrs. Dubose's bravery in fighting addiction and illness. In Chapter 11, Atticus makes repeated pleas with both children to "be a gentleman." When Jem first addresses Atticus about this, he tells Jem, "You just hold your head high and be a gentleman. Whatever she says to you, it's your job not to let her make you mad." In other words, being a gentleman is to be patient, understanding, and tolerant.