This sloka has to be understood in the proper context.Here Lord Krishna says that the four Varnas were created by him.Here Varnas means caste or colour.This sloka has been misunderstood by people thinking that the caste system was created by God.Actually what lord Krishna says is that it is mental traits (gunas) and actions( Karma) and not birth that decide the caste of a person.
Brahmin – A person in whom Satva Guna is predominant,
Kshatriya– A person in whom Satva Guna tained with Rajas prevails.
Vaisya– A person in whom Rajas predominates with a tinge of Satva.
Shudra – A person in whom Tamas is predominant with a tinge of Rajas.
The qualities of the Gunas are :
Satva: The pure qualities of Sattva are (12) and they are1: Kindness (Anarishanyam), 2: Discretion in the use of articles (Samvibhagaruchita), 3: Forgiveness (Titikshna),4: Truthfulness (Satyam), 5: Righteousness (Dharma), 6: Belief in God (Astikyam), 7: Knowledge (Jnanam), 8: Wisdom (Buddhi), 9: Intelligence (Medha), 10: Memory (Smriti), 11: Firmness (Dhriti), 12: Non attachment (Anabhisangshcha)
So a Brahmin’s son ( by birth) can be a shudra if he has predominance or tamas and a Shudras son(by birth) can be a Kshatriya if he a predominance of Rajas with Satva.It is the mental make up that decides the varna of a person.
So in every person these gunas are inherent and one or two gunas may be predominant.So if a person has more tamoguna , then he must evolve to rajasic and satvic gunas for liberation, A vaisya-mind should develop more of Satva and Rajas,and a Kshatriya who is brave because of Rajo guna should cultivate more of compassion to gain Satva in him.If these Gunas are so developed then only spiritual liberation can happen.So everyone should try to develop as much Satva in him as possible for Liberation.