etair vimuktah kaunteya
tamo-dvarais tribhir narah
acaraty atmanah sreyas
tato yati param gatim
etaih—by these; vimuktah—being liberated; kaunteya—O son of Kunti; tamah-dvaraih—the gates of ignorance; tribhih—three kinds of; narah—a person; acarati—performs ; atmanah—self; sreyah—benediction; tatah—thereafter; yati—goes; param—supreme; gatim—destination.
The man who has escaped these three gates of hell, O son of Kunti, performs acts conducive to self-realization and thus gradually attains the supreme destination.
One should be very careful of these three enemies to human life: lust, anger, and greed. The more a person is freed from lust, anger and greed, the more his existence becomes pure. Then he can follow the rules and regulations enjoined in the Vedic literature. By following the regulative principles of human life, one gradually raises himself to the platform of spiritual realization. If one is so fortunate, by such practice, to rise to the platform of Krsna consciousness, then success is guaranteed for him. In the Vedic literature, the ways of action and reaction are prescribed to enable one to come to the stage of purification. The whole method is based on giving up lust, greed and anger. By cultivating knowledge of this process, one can be elevated to the highest position of self-realization; this self-realization is perfected in devotional service. In that devotional service, the liberation of the conditioned soul is guaranteed. Therefore, according to the Vedic system, there are instituted the four orders of life and the four statuses of life, called the caste system and the spiritual order system. There are different rules and regulations for different castes or divisions of society, and if a person is able to follow them, he will be automatically raised to the highest platform of spiritual realization. Then he can have liberation without a doubt.
Link to this page: https://prabhupadabooks.com/bg/16/22