Irony
Irony is the when reality contradicts appearance. In this example, it's ironic that the convict, about as far from a gentleman as there could be in Victorian England, is the man who makes Pip a gentleman. It's also ironic, insomuch that Pip only appears to be a gentleman. In reality, he's a pompous jerk.