I'm curious how the precedence of these ranks came about. It is, in the words of Mr. Spock, highly illogical to me.
The rank above Lieutenant General is General (or General of the Army). The "lieutenant" portion of the rank is derived, therefore, of being the person who takes over in the place of the General when he is not present, or, more specifically, the man who carries orders for the General to places he cannot be personally.
Look at the parts of the word: the lieu tenant is someone who tends to things in lieu of the usual officer in charge. In this case, the lieutenant general is the man who takes over in lieu of the General.
The rank of "lieutenant" in the army is a junior officer below a captain, who has the same relationship to a captain as a lieutenant general does to a general. The rank of major is above captain (in the army), and has no relationship with the rank of lieutenant.
You can see this more clearly in naval ranks, where the lieutenants were originally the only officers (other than the captain) and were all different degrees of seniority away from the captain's own authority (first, second, third lieutenant, etc.). Nowadays, we can still see this in the rank of lieutenant commander -- a man who tends to things in lieu of the commander, above him.
I hope this answer suffices by the sub rules, because it's not terribly densely cited, but this is more of a semantics question than a historical one really, so I'm hoping an answer on the etymology will be adequate!
The important distinction is what "Lieutenant" actually means. Breaking down the term, "lieu" and "tenant," it etymologically means something to the effect of "One who holds a position in lieu of..." Generally the term is essentially "second," or "second in command," such as a Lieutenant General representing a full General, or a Lieutenant Commander operating in the Commander's stead at the Commander's usual post. A Lieutenant General is going to be the "second" to a General, whereas a Major General is below that. That's why you have a "Lieutenant Governor" in some states, or a "Lieutenant Commander" beneath a Commander. The standard rank of "Lieutenant," however, tends to designate a junior officer. In most military settings where it's used, it's the designation for a junior commissioned officer.
OK, now explain how "captain" has such a wildly different meanings in the navy versus the army, and also explain why lieutenant is pronounced "leftennet" in the UK.
This is a really interesting discussion. To expand on OP, where does Warrant Officer come from?