It is said in Yoga Vashishta that one of the four gatekeepers to liberation is satsang (the company of truth). Please elaborate.
Yes, one of the four gatekeepers to enlightenment is satsang, which means having the right company because it is a good company that uplifts you.
How do you realize what is a good company? Just sit with someone and talk to them for over 30 minutes. When you get up, observe your state of mind. Do you feel happy? Do you feel depressed? Do you feel angry, agitated or sad? That says it all!
If you sit and discuss your problem with someone, and they appear to be insignificant, then that is good company. But when you discuss your problems with someone and you come out feeling, "Oh, I thought it's a small issue. It feels to be much bigger!" When the problems appear to be much bigger, then that is bad company. It's not satsang.
Satsang is one in which even the big problems appear to be much smaller. Your enthusiasm is high, you feel confident, you feel happy and you want to serve people. You don't become greedy - that is satsang. Satsang creates positive energy in you, uplifts your spirit, gives you insight and gives you courage.
Sometimes you live inside a bubble, satsang will bring you to ground reality. Suppose you are imagining something or hallucinating, satsang will make you realize the ground reality. It will bring you to a point where you realize that you are imagining, or whatever you were doing is not correct.