Can a graduate school dean prevent you from attending a class?
The answer to the title question is, unfortunately, that the Dean of your graduate school is in a much better position to know whether he can prevent you from attending class than we are: we don't know what the school is, and we don't know any of the details of what sounds like an ugly situation.  This is not the sort of question that you can rely on the internet to answer.

Having said that, given only what you've said, the Dean's directive sounds outrageous.  A student's right to attend class should only be forfeited by serious negative behavior on the part of the student.  Reporting negative behavior of the instructor should not remotely qualify.  Moreover, a student who may not attend class should be withdrawn from the course...because the alternative does not make much sense.  In this case, if your withdrawal is necessary then you should be excused of any negative consequences of it.

I am at a loss to make any specific recommendations to you.  Frankly, as you depict it the Dean's behavior is so outrageous that I have to wonder about the further details of your story, including the nature of the bullying, but a sufficiently full accounting of your story would involve divulging too much personal information on the internet, so I am not fishing for more information here.  On the off chance that the Dean is simply behaving very strangely, it could not hurt to follow up with other university officials: e.g. your own academic advisor, an ombudsperson, the human resources department and/or the registrar.

Finally, 99% of the time, using the American legal system to resolve academic disputes is the wrong thing to do.  But (depending in part on the nature of the bullying) your case might be in the 1%.  Your issue -- namely that your institution is handling your allegations of interpersonal workplace misconduct in a way that seems inappropriately punitive to you -- is not an inherently academic one.  So you might look into exploring that further.

Good luck.

Added: @tonysdg's comment of looking into withdrawal is a good one.  I wouldn't only do this, but if withdrawing from the course saves you from failing and losing your financial aid, then it would give you some breathing room at least.