Although the two often go hand in hand, there is a distinct difference between gender identity and sexual orientation. Gender identity typically refers to what is happening in relation to the physical body, where as orientation deals with who we are attracted to sexually.
Gender identity is how we identify on the male/female spectrum and how we'd like others to perceive us. Most people are born as either physically male or physically female (with some obvious exceptions). That being said, this is not always the case when it comes down to how the person identifies emotionally, as some people feel that their gender does not match their physical sex.
Gender identity affects a person's life in many, if not all areas on a daily basis. We use gender specific restrooms, have gender specific departments in stores, and have created gender specific fragrances. In many cases, gender even affects how we interact with each individual person we encounter in terms of behavioral expectations, roles at jobs or in households, and on many other levels. We have a tendency to place gender specific expectations on people based on their identity as male or female, men being stereo-typically strong and given the role as provider, and women being seen as stereo-typically sensitive or emotional and are expected to be caretakers.
From a young age, we are conditioned to accept our gender. Boys play with trucks and tools, girls play with dolls and tea sets. Many children don't often think about gender growing up because their gender matches their anatomy. However, in some cases, boys want to play with dolls and girls want to play with trucks. While it can be an extreme situation, this can sometimes be the first sign of a child's gender identity shifting (or a preview to the child's sexuality which is usually determined a little later in life). Some societies are very accepting of the fact that not everyone fits directly into the male and female categories and they acknowledge a third gender. Trans individuals have the tough job of dealing with issues of gender in society because they want to physically represent who they truly are on the inside.