(covers information from several alternate timelines)
A genius was an unusually intelligent person. The term could also be used sarcastically to describe a person whose level of intelligence was questionable.
In 2266, James T. Kirk expressed his distaste for "the headquarters genius that assigned me a female yeoman". This was shortly after Janice Rand, the yeoman in question, brought him the dietary salad he had been prescribed by Doctor Leonard McCoy, saying it was past time that he ate something. Kirk felt she was hovering around him. (TOS: "The Corbomite Maneuver")
Richard Daystrom was a genius, a fact which was noted on his biographical tape. Kirk believed the word to be an understatement, as he made significant discoveries in the field of duotronics at the relatively young age of 24. (TOS: "The Ultimate Computer")