I had what I think were panic attacks a few times during my stressful first couple of years as a line cook (in retrospect, a bad occupation for someone with anxiety issues). It happened when we got "in the shit," with a pile orders 15 tables deep, and a head cook yelling at us to get that steak out NOW. I would reach a certain level of stress and then it was like my cognitive functions absolutely shut down, and suddenly I was a hyperventilating, shivering, useless wreck.
The first time, there was nowhere to hide, and I got fired on the spot, because my supervisor assumed that I was deliberately engaging in histrionics or something.
Subsequent bosses and coworkers were more understanding. What worked for me was letting my coworkers know that sometimes I just needed a few minutes in the bathroom or outside by the shipping doors or whatever. I found that if I could be alone for a few minutes I could calm down at least enough to think again. I would take some deep breaths, splash some cold water on my face, and jump back in.
As I gained experience and got more confident, this stopped happening. I would still feel the stress, but it didn't quite go over the line into panic attack. I still had an occasional attack in other situations, but not at work.
I think many people with panic disorders cope partly by arranging their lives and work to accommodate their disorder. Part of this is finding strategies to keep the general stress level low; part of it is being in a place where you're valued and respected for your skills, so the occasional at-work freak-out is treated with understanding; and part of it is having a job where you can take a little time when you need to. (If you have a panic disorder, I'm guessing that fast-paced, demanding, high-stress occupations are not for you.)
If this happens to you regularly, you need to see a doc to talk about long-term strategies, like changes in diet and exercise, anti-anxiety meds, and therapy. Cognitive behavioural therapy is especially effective for treating panic disorders, I'm told.
As others have said, you might want/need to make excuses instead of going through the "I have panic attacks..." rigamorale, because of the stigma attached to it. Tell 'em you have Irritable Bowel Syndrome if you have to. No one will question you. However, I've found that "stressed out" is a concept that most people can relate to. Sometimes there's no need to get into clinical jargon; just tell them you get a little overwhelmed by stress sometimes, and that you just need to take a break to get over it.
Read up on panic attacks, if you haven't already. I think just knowing how they work removes a lot of the scariness.