The two gender thing is at least old, SAOB tells us that blick is common gender, masculine or neuter, the latter is marked as archaic, but they give examples like (1738: ett nådes blick), RINMAN 1: 232 (1788: Silfverblicket) alongside with common gender examples from the same time.
It's suggested that the old neuter usage may have been the effect of the influence of the word blek/bleck (noun blek 1, archaic word no longer used this way).
Probably both genders for blick existed alongside each other, and then neuter got stuck to ögonblick and common gender won the rest of the field. It's not that strange that a more abstract compound where the meaning of 'look' is to a large extent lost, could have another gender.
That's a very good question! I have searched for an answer too, but haven't found anything substantial. I am pretty sure that it does not have anything to do with the gender of "öga" though. For example, compare to:
en ögonfrans - an eyelash
By the way, someone said that the genders differ in Dutch ("blik" and "ogenblik") as well. I don't speak Dutch myself, so I don't know if it is correct :).
Excuse me, but that's how combined words work in every european language where there are some. In Swedish as well, it's pretty much always the case, it has nothing to do with the subject of the action, it's all about what is the word we're defining. Compound words are not magic, they have a logic behind them, and that logic is that you add a word at the start of another to complete the second one. My examples might as well have been in Swedish, in Swedish the compound word doesn't take the gender of the subject of the action .
I also have an Italian example: basketball = la pallacanestro. Words ending in -o is usually masculin (il), but ball = la palla, and basket = il canestro. "La palla" in the beginning 'won the game", so to speak. Anything can happen in language! That's why I love languages. :-)