I'm sure that in practice it depends entirely on the institution, the department, and the specific instructor, but in theory just talk to the instructor. If the instructor is nice, there will be a short discussion to see if you would just be wasting your time on something too difficult for you. If not, then nature will take its course one way or the other. I've seen graduate math classes with more undergrads than grads, and I've seen classes where all the undergrads dropped out because the class was too hard for them.
You should be aware that all the prerequisites are not always mentioned, as the context is that the course is meant for grad students. The assumption may very well be made that naturally you're had undergraduate courses in topology, real and complex analysis, etc. This depends on the institution and department and it's up to you to ask the right questions. If it were me, I'd have a chat with the department chair to see if there's any policy I should be aware of.