Meaning of "beautiful mind"
It does refer to the movie and to genius, but it's a weak compliment at best, and sounds snide to me both because it is dismissive ("I don't know anything about math or geniuses, but I guess you're one of those people") and because it implies, intentionally or not, that the subject is insane (like Nash in the movie/book/real life), possibly also implying that the insanity goes along with the genius. It makes the concept(s) comfortable and convenient in conversation by trivializing them and reflects a sort of uncaring ignorance ("those crazy smart guys, who I don't know anything about but I saw in a movie, and we know that movies are all fake"). Use it in conversation if you wish, though you may have to explain the reference to people like yourself who aren't sure where it comes from, but don't use it near academics, since then it becomes personal.
Yes, that's referencing the movie A Beautiful Mind which told the story of John Nash, a mathematical genius who was a paranoid schizophrenic. In general, it can reference someone who is a genius in a particular field, but whose behavior or personality is outside social norms (very similar to the cliche of the socially awkward nerd)
Because this is a cultural reference, whether it's appropriate or not is highly audience/location/time dependent, so I would not use it under most circumstances, and certainly not in an academic one.
In a "60 Minutes" interview many years ago, one of John Nash's classmates said that the term was a specific description of Nash's brilliance and eccentricities. The full quote was something to the effect of "John is a pain in the ass, but he has a beautiful mind." Unfortunately, I haven't been able to find a link to the "60 Minutes" segment, so I'm going from memory.