Firstly, Socrates gives his definition of happiness before he discusses virtue and its relation with happiness. He seems to hold a unique definition of happiness states that the usual definition of happiness just makes one think that they are happy; however, the real happiness consists of something much deeper. He says, "The Olympian victor makes you think yourself happy; I make you be happy" (Apology 36e-37a). The constant questioning he practices, according to Socrates himself, is in effect helping the Athenians be happy because it is helping them move along the scale of wisdom. His further dialogue clearly explains that true happiness goes beyond worldly goods and external wealth. He says, "Wealth does not bring about excellence, but excellence makes wealth and everything else good for men" (30b). In other words, one is not able to buy perfect happiness. So, one might ask what else is needed to achieve perfect happiness if it can't be achieved by wealth and external comforts alone? The answer, according to Socrates, is virtue.
Being virtuous means doing and being good as much as one possibly can and according to Socrates, this is the most precious quality one can have. "[T]he greatest benefit [is to be] as good and as wise as possible," he says (36c). And by being good or virtuous, you make yourself literate which in turn makes you immune to any harm inflicted by those who are not virtuous. This idea of goodness and virtue goes anything beyond worldly values and ideals. "A good man cannot be harmed either in life or in death"(41d), says Socrates further explaining that no matter what, "a better man [cannot] be harmed by a worse"(30d). Having virtue gives you a certain happiness that is well beyond life or death or worldly values and goods.
So, how exactly does a person become virtuous? Socrates offers suggestions and explanation for this question as well. Socrates claims that one cannot be virtuous accidentally. Just because you commit a virtuous act does not make you virtuous. An understanding of the concept of virtue is equally important as the virtuous act itself. One needs to understand the nature of virtue which requires reflection of virtue and this reflection is only possible once you grasp your own ignorance about the nature of virtue. This understanding of one's own ignorance is human wisdom. So, since being perfectly happy requires being virtuous and being virtuous requires human wisdom, human wisdom is necessary for perfect happiness.
So as a person begins to acquire human wisdom which is merely an understanding and acknowledgment of one's own ignorance, they are on their road to acquiring perfect happiness. So what happens to people who cannot acquire human wisdom and in turn cannot be virtuous? Are they denied happiness altogether? Socrates claims no, these people can be happy but just not perfectly happy.
It seems like Socrates is saying that in order to achieve perfect happiness, two things are necessary. One of them and the most important one is being virtuous and all the requirements of human wisdom that comes with it. And the second factor is external goods and wealth. If you have neither virtue nor wealth,...