Lieutenant junior grade

Lieutenant junior grade (often abbreviated to lieutenant J.G.), or junior Lieutenant is a military rank, the equivalent of which is used by the service organizations of many civilizations. A naval rank in a small number of Earth's ancient navies (such as the US Navy), it is placed between ensign and full lieutenant. The rank is used primarily by the Federation Starfleet, although its Earth predecessor (from which it primarily takes its rank structure) may also have had this grade.

From Memory Alpha -- the free Star Trek reference