Constancy in knowledge of the self, and seeing the purpose of knowing the truth of things: this is declared to be knowledge. Whatever is contrary to this is ignorance.
Explanation
Krishna is concluding his list of qualities (begun a few verses earlier) that he calls "knowledge" (jñāna). The last two items are steady commitment to knowing the self (adhyātma) and keeping in view the goal of knowing the ultimate truth (tattva). He then defines everything opposed to this list as ignorance (ajñāna). Traditions differ on the final item: Advaita readers take the goal as liberation through self-knowledge, while devotional readers take it as realizing God.