The answer to this is very simple and actually directly stated by Elizabeth herself. But before we discuss this, let's identify precisely what her problem was so her self-realization will be in context.
Elizabeth's problem was essentially three-fold. Firstly, she took a prideful dislike to Darcy because he rejected and slighted her at the Meryton ball. Because of his slight, she spitefully aggravated her immediate dislike of him and amplified it with every new thing she learned of him. In fairness, she was justified in being put off by his interference between Bingley and Jane. Though from the other perspective, Darcy was actually correct in his censure of the Bennet family, as the end of the story shows.
Secondly, Elizabeth behaved in the same manner--rushing into ill-founded opinion and judgement--toward Wickham. This time, though, her actions resulted in the reverse of her opinion about Darcy. With no good reason at all except that of a charming face and easy, amiable manner, she gave a preference to Wickham even while he was relating things that, under normal circumstances, Elizabeth would have thought improper.
Thirdly, her reaction to Darcy's part in Bingley's departure developed a deep ire in her heart toward Darcy. The playful edge was worn off her prejudice and was replaced with a real animosity. This was compounded by her equally ill-founded disregard of her family's behavior. She saw they were behaving questionably but discounted that there could be any real harm in it because Jane, herself, was so far above reproach that her personal attributes were enough to outweigh any harm from her family.
This was Elizabeth's problem. What was her self-realization? On the first point, she realized that while she had been accusing and ridiculing Darcy for pride, she had been egregiously guilty herself of pride toward him. On the second point, she realized she had been fooled and manipulated by Wickham for his own designs and that she had a very close call with her heart on Wickham's account. On the third point, she realized that it was her family's uncontrollable conduct that was the true cause of Jane's unhappiness and that Darcy behaved in a reasonable manner in advising escape when Jane's "complacency" disguised her "fervent" feeling for Bingley.
She grew absolutely ashamed of herself. Of neither Darcy nor Wickham could she think without feeling she had been blind, partial, prejudiced, absurd.
"How despicably I have acted!" she cried; "I, who have prided myself on my discernment! I, who have valued myself on my abilities! who have often disdained the generous candour of my sister, and gratified my vanity in useless or blameable mistrust! How humiliating is this discovery! ... Pleased with the preference of one, and offended by the neglect of the other, ... I have courted prepossession and ignorance, and driven reason away, where either were concerned. Till this moment I never knew myself." [...]
When she came to that part of the letter in which her family were mentioned in terms of such mortifying, yet merited reproach, her sense of shame was severe. The justice of the charge struck her too forcibly for denial, ....