There was a time when I was younger that gangs used to unsettle me. Where I used to live there were always large gangs of youths hanging around the streets. More often than not they would give me a hard time. I guess it was their way of having fun. After all, what else do you do if you spend all night hanging around on a street corner?
What gave me confidence back then was the fact that I knew I had a lot more positive things going on in my life than they did. Although they used to give me a hard time as I was walking past them of an evening, they had no idea where I was going to or what I was planning on doing that night. More often than not I was going out somewhere good, to meet friends, to have some adventures and to enjoy life. Whilst I was doing that they were probably still standing around there, on that same street corner, in the cold, making fun of anyone else who cared to walk by them. Is that a fun and productive way to spend your evening? They're welcome to it!
Gang culture is understandable, though. I think everyone wants to feel like they "belong" to something. Unfortunately, the majority of gangs are populated by people who aren't very intelligent or know little of the world beyond the narrow perimeters of their understanding. The most dominant members are often physically strong and overbearing, but weak in the most important areas of life.
I guess the trick is to not let it affect your confidence. You need to build a "world" of your own that brings you happiness. Do things you enjoy doing. Go places you want to go. Never let other people stop you from living your life or following your dreams. Over time, negative opinions of others won't affect you so much. You'll learn to walk taller and hold your head up high. No matter what anyone says to you, you can have a "secret smile" to yourself and just know that what you do with your time is much more preferable to how they choose to spend theirs.
This may not apply to you, it's probably because I'm a male, but I find that working out and keeping physically fit also helps with my confidence around gangs and groups of strangers. I'm becoming quite physically stronger now (thanks to working out) and I don't feel quite so fearful about walking past groups of males in the street at night. I know I can look after myself now. I was once mugged in the street, someone tried to take my money, and that person was a lot bigger than me. I think it really surprised them when I chose to fight back. I really fought him hard and he ran away. It was awful to be attacked in that way, but it also gave me confidence to know that I wasn't prepared to be someone's "victim".
Not all gangs of people mean us harm, though. It helps to be able to judge a situation and to read people's body language and posture. Learn to separate "banter" (harmless comments made in fun) from genuinely hostile ones.
I think in your situation, just try to work harder at making a better life for yourself in general and this will give you the ability to walk a little taller in life and around other people.
Who knows? In time, maybe they'll want to join your "gang", so to speak.
I hope this helps.