If it were just a problem at school then I would suggest going through steps that let the school know they will be held liable for any failure on their part to protect your kid while there. But it sounds like this is a "town" issue, not just at school.
Pulling a knife on your son is a serious crime and a real threat. I side with 308Win and others that you have to make a strong stand. It is better to let the adversary know as early as possible that if they bring the fight to your family then you will respond 10 times in kind. If they have any weakness this may be enough to encourage them to back off or move on elsewhere.
As others have said, I would tag along with my son more often until you can see these kids, and then get in their face and let them know they will not be dealing with just your son. If there is any problem you will be visiting them. If you already know who they are and where they live that might make more impact if you can mention their home locations.
I would do this in a manner that does not cross the legal line of threat, but that clearly implies you are likely to go beyond legal limits and do whatever is necessary to punish them. I would also visit their homes and let their parents know what their kids are doing and that there will be hell to pay if they do not reign them in quick.
That is all at the personal level, which is the most important. You need to prepare for the worst as well. The key to winning a fight is to first know that you are in one, then anticipate the worst, prepare for it and already have your actions planned out. I would carefully run through scenarios and make sure you know exactly how far you will go, and what will trigger that response. Never bluff. When you threaten to react make sure you absolutely will do so. Identifying and documenting these other kids, where they live, who their parents are, etc. is crucial for going public and letting them know they are not hiding anything.
On the public side I would work with the school and police as much as possible. Also try to organize a citizens group. Appeal to their self interest. If we all act now we can run this problem out of town (maybe the kids and parents, but mostly their behavior). If not then we will all be seeing more violence, more kids intimidated and recruited and more drugs showing up and thefts occurring (gangs need money). Good idea to carry a camera or video cam with you as much as possible and start documenting as much evidence as you can on these specific kids and gang activity in general in your town. Your presentation to the school, police, and fellow citizens will be stronger if you have pictures of graffiti, corners taken over by gangsta looking kids, etc. Save news articles about youth crime in your town, too.
This would be a good time to research any successes other towns have had. The main thing is to do as much as you can to work within the law, while letting the "gangstas" and their parents know that you will do what is needed one way or the other. The clear message you want to communicate to everyone is that it is in each of their best interests to terminate this activity quickly or else they will be suffering far worse consequences. It is not just your problem.
Also agree with having a serious talk with your own son. Make sure he understands you will stand up for him and do some serious things if it escalates any more. You are totally on his side but he also needs to be 100% truthful with you or you may act on bad information that could cause a lot of its own problems. He also needs to think through with you how he can responds in various situations. Cell phone with camera and GPS is a good idea. Make sure he always lets you know where he is and who he is with. If three guys threatened him before that kind of gives you an idea the ratio they like to have in their favor. If he was with 2-3 other buddies the gang would need to have 9-12 guys to have the same favorable ratio. His odds go up tremendously with just 1-3 friends around. If they all have cell phones with cameras then they have a lot more working against them.
Is there anything in your son's behavior that would have singled him out for special attention? Other than rejecting the gang, does he hang out alone? Hang out in the wrong places? He shouldn't have to avoid the park and other public places, but he should not be looking for trouble either.
Your son also needs to understand how to defend and fight. Never fight on their terms. Run when necessary, back off slowly at other times. But also when to make a stand (better armed, numbers on your side, on ground of your choosing, and a time of your choosing).
I was in a small town in Iowa and the vandals of the town were kids of the town leaders. The police refused to do anything because they were under 18. They kind of implied that they expected you to take care of your own situation. I confronted a bunch of them after they vandalized some of my property and let them know I would hunt them down next time(nothing specific about what I would do). They were full of big talk but nothing ever happened to us after that either.
All I know from competitive sports and my own confrontations as a kid and an adult is that if you choose to stand you want to make clear that you will respond with overwhelming force in every means possible: legal, publicity, and if necessary personal violence. Any wanna-bes will back down in the face of grave and sure consequences. Anyone that does not back down after that you will know means you serious harm and you had better be ready to act on your words.
A massive, all out pre-emptive campaign can actually make the whole thing go away much more quickly. A gradual, proportional response is likely to drag this out with no clear cut "crossing the line" until it is too late. For me the knife puts this over the line and requires an all out response on every front possible. Hopefully other families will get on the band wagon and this problem can be nipped in the bud for the whole town. If not, the gang at least needs to know that your family or part of town is off limits.