The answer is size. The larger the DNA molecule the slower it travels through the gel. This is because of the restriction of their movement through the pores of the gel. The smaller DNA molecules travel furthest. The size of the pores can be varied through by changing the mixture ratios of the agarose gel.