What then? Do you give up? You do not!
For a lot of people, the difference between getting licensed and not is just a few points. That's as little as a question or two. Ask anyone who has made it through the exam, they were guessing on at least a few of the questions. So, the difference between a licensed social worker and a frustrated unlicensed one is a couple of guesses.
A few things to remember as you pick yourself up, wipe yourself off, start studying all over again. (And waiting. It takes months before the board allows retaking. Which makes sense. You've got to wait till a new exam is in rotation. Can't take the same exam. Wouldn't be fair.):
1. This doesn't mean you're not a good social worker. Social work ability and social work exam ability aren't the same thing. Simple as that.
2. People who passed the exam aren't necessarily better social workers than you. The exam tests, among other things, test-taking skill. Also, preparation. Some have time and resources to access practice exam after practice exam. Others have to steal time between clients to glance at exam-prep material. Practice exams are priced out of reach for many. Like so much in life, a level playing field does not necessarily exist for those heading into the exam.
3. Just because you didn't pass doesn't mean you won't ever pass. Next time you go in, you'll have an advantage. You'll know what the exam looks like, what it feels like to take the exam, and maybe you'll have a better sense of what got in your way the first time. Were you under-prepared? Fixable. Were you anxious? Also addressable. (Try CBT for anxiety reduction. You'll be getting treatment and studying for the exam simultaneously. CBT tends to come up on the exam quite a lot.)
Three simple, true things to tell yourself. You have to retake the exam? No big. It's doable, it's been done, you'll get 'em next time.
Good luck!