Meaning and origin of "get a grip"
Solution 1:
"Get a grip" actually has two meanings.
When a person has let their emotions take control of their actions and thoughts, often times people will tell them to "get a grip" - to get their emotions under control.
From thefreedictionary.com:
Get a grip (on yourself): to make an effort to control your emotions and behave more calmly. (ex. Come on, get a grip, we've got an important meeting in five minutes. I just think he ought to get a grip on himself - he's behaving like a child.)
Get a grip (on yourself) (spoken): to control your emotions. (ex. I know it's hard, but get a grip on yourself and tell me what you saw. Oh, get a grip, Tess! It's really not as bad as you think.)
Additionally, "get a grip" can also refer to gaining an understanding:
Get a grip (on something): to understand how to deal with something. (ex. The program will have helpful tips on how to get a grip on your finances. Something is obviously not right in our organization, and we must get a grip on the problem.)
As to the origination of the idiom, that I'm not sure of.
Solution 2:
It's a shortened version of "Get a grip on reality". It means that the speaker believes that the person being spoken to is not thinking straight: that they've lost touch with reality. They are suggesting that you regain contact with reality.
It usually implies that the speaker thinks that your opinion is very poorly considered.
Solution 3:
Used as imperative, get a grip means "keep or recover one's self-control."
Get a grip, guys!
Solution 4:
I think the point everyone is missing: the term grip can be used literally as in, "Make sure you have a good grip on that ladder or I will fall." Therfore, get a grip or get a grip on reality is the juxtaposition of abstract things such as emotion and reality with the metaphysical thing such as getting a grip on a ladder, screwdriver or even you're cars grip on the road.