That sounds soooo familiar!! I had exactly the same problem with Humphrey and it got to the point that we were both so stressed, I felt it was doing more harm than good. The trainer used to joke that Humphrey was "in Humphrey's world", it was like he was on another planet, nose to the ground and no focus whatsoever. In the end I gave up for a couple of months but then joined a dog club that offered training in a more relaxed environment and the difference is amazing! I put it down to a number of factors, don't know if any of these apply to you, but might help:
The new training ground is much bigger and if Humphrey starts sniffing or becoming distracted, I move a bit further away crom the other dogs.
The trainer is far more laid back, gives encouragement rather than criticism and praises both me and Humphrey, which makes me feel much better, - that, in turn, makes me feel less stressed which Humphrey picks up on too.
The dogs are given adequate time to let off a bit of steam before we start and then have a beeak and another run around inbetween exercises.
All exercises are fun, the dogs enjoy what they're doing and are far more focused. They're praised profusely when they do well, but we just smile if they don't!
Humphrey is also older now (over 2), at one year, he was very exciteable.
So, in conclusion I'd advise, don't be afraid to have a break for a couple of weeks and/or have a look if there's another class or trainer that might be better for you, stay as relaxed as you can and don't compare your dog with any of the others as they all develop at different rates and all breeds have different qualities, a good, experienced trainer will recognize that.
If Bailey is stressed, leave the class early if necessary, if he's under pressure it does more harm than good and he's not going to learn anything anyway. It took us a while to get to this stage but finding a class where we both felt relaxed has made a world of difference but I think age also has a lot to do with it. Best of luck!