It's typically used as a euphemism for a desire to be the opposite sex in some way or another. For example, if a male wants to be female, or even just sees himself as somewhat feminine (i.e. having some interests or behaviours that he perceives as being more commonly associated with women), he may announce that he has a 'female gender identity'.
The benefit of framing this as an identity (and one most often described as innate and unchanging) rather than a desire, is that it has a 'who I am' connotation instead of 'who I want to be'. Which has been useful in a broader cultural context in gaining acceptance for this desire, especially in the political arena; compare e.g. 'trans women are women' versus 'transwomen are men who desire to be women'.
Another useful property of gender identity is that it is unverifiable and unfalsifiable, much like the concept of having a soul. Therefore anyone can claim to have any gender identity, and there's not really any challenge that can be made to such claims other than accusations of deception or delusion, neither of which are considered socially acceptable, in most contexts. This also shifts the rhetorical ground from the material (biological reality of sex, sexual mimicry via hormonal and surgical interventions) to the metaphysical. So this also helps shield this desire to be the opposite sex from criticism.
Also, as it's usually defined as something like 'an innate sense of one's gender', there's a useful definitional confusion in that. Most people will just use their self-knowledge of being female or male to answer the question of gender identity, even though this is a different type of concept to desiring to be the opposite sex. So in this way, gender identity can be presented as being something everyone has, despite it referring to distinct phenomena.
In short, it's the centrepiece of a rather impressive rhetorical strategy to normalise and institutionalise the desire to be the opposite sex.