Studies from twins suggest that DNA does have an influence on your personality. Identical twins have more similar personalities than non-identical twins, and non-identical twins have more similar personalities that other brothers or sisters. Even if the twins are raised separately, their personalities are still more similar when compared to a random person. However scientists are still debating about the influence of nature (your genes) or nurture (the environment you grow up in).
I completely agree with Amanda’s answer which highlights some of the amazing pioneering work done using twin studies. There is also a relatively new or at least rapidly expanding field in genetics called “epigenetic” where researchers are looking at how environmental factors can influence genetic material and in particular our DNA. It appears that environmental events can have profound and long lasting effects on the DNA, how it is regulated, transcribed to RNA and ultimately translated in the protein machinery necessary for our cells to function. Those cells include the neurons in your brain that control aspects of personality.
How DNA codes for personality is still very much up for debate. The nerve cells in your brain have to be specified to acquire a certain function – early development genes ensure this is done in the right way. Then they have to form the right connections (DNA codes for proteins that ensure this) and become electrically active (DNA codes for ion channels and pumps that allow this to happen too!). This all occurs very early on in your life – a lot of it before you are born. Then, once you are out in the world, the environment – parents, friends etc. start to influence you and your brain will acquire amazing new skills through learning and memory mechanisms. Some of these last for ages (some smells bring back intense early memories) while others (my knowledge of French) fades fast. Those memories are created through proteins and signalling pathways which can ultimately – as in the case of that smell, alter the transcription of DNA. That will then change how the nerve cell responds to activity and then could potentially alter your personality.