Let us remember that Freud argued our personality was made up by the id, the ego and the super ego, and that the id played the role of trying to convince us to pursure our own selfish desires regardless of the consequences and what morals we might go against in the process. The super ego played the role of trying to keep the id in check and following higher morals and values. We can effectively relate the interaction of the id and the super ego, respectively, to the cartoon image we often see of the devil and the angel perching on somebody's shoulder, each whispering their own advice to the ego, which makes a decision.
What is interesting about how Freud's theory of the selves relates to Dorian Gray is that this brilliant novel contains two literal representations of the id and the super ego. Note the way that Lord Henry is the character that is constantly trying to encourage Dorian to engage in acts of ever-greater decadence, wheras it is Basil who acts as the super ego, trying to restrain Dorian and keep him innocent and pure. In a sense, Dorian is a battle ground for these two opposing forces, and what is interesting is the way in which, at various points in the novel, Dorian himself suffers massive internal conflict as he debates whether to do the "right" thing or continue on his hedonistic path. He does this for example after finding out about the death of Sibyl, and then again at the end of the play when he resolves to destroy the portrait and begin his life anew. The entire novel presents Dorian as a character who is caught between the two forces of the id and super ego.