Gerald's character description:
Gerald is the only one who really seemed to genuinely care for Eva. Anyone else who was involved with Eva pushed her away in order to gain something for themselves.
Gerald didn't push Eva away; he saved her from the man in the Palace Variety Theatre. He made her live at Morgan Terrace because he felt truly sorry for her and wanted to help.
The fact that they ended up in a relationship shows that Gerald must have been a really good friend to Eva for them to become comfortable with each other. He is an example of the people in the higher class with respectable morals, who are held back by their own people and traditions.
This is why he appears to agree with both the Birlings and the Inspector; he doesn't want to go against his own class but he didn't want to turn away from his mistakes either.
He wanted to fit in with the Birlings to impress Arthur so that he could marry Sheila; their talks of business ventures proves this, where Mr Birling presents his ideas and Gerald simply agrees.
Priestley uses him as an example of the conflict society is faced with; his confusion mirrors the audience's in terms of what is right and what is expected of them.