I'd definitely document it like Bryan said. Depending on how I imagine the comment, it could be kinda scary, in an unhinged way.
If it wasn't that scary, though, allow me to project a bit onto this guy. I've been in classes before where I felt I didn't have a fair chance to do well, and been mad at the professor about it. If this guy has been harboring resentment and every time you pass each other, you awkwardly ignore each other, I could see that resentment growing, especially if the student is having a rough go of it in life (which, being a grad student, he probably is).
In fact, I've had that experience too. There's a professor whose class I disliked my first year who figured out that a rather criticism saturated student evaluation must have come from me. (I was really trying to be constructive.) He didn't take it well, and to this day still never acknowledges my existence when we see each other around, despite working in my research area, and even living on my street. I'm not really mad about the class anymore, but this still annoys me. You know me, man-- can't you at least give me the nod?
My point is, you might be able to de-escalate things just by acknowledging him. If you make some friendly small talk and show him that you didn't take it personally, it's possible that he will cool off and not make things so tense. Of course, it's also possible that my reading is totally off and he will just be rude, so be prepared for that possibility. But it may be worth a shot before going to his chair.