Lincoln got elected because the Democrats split during the election. Stephen Douglas in the North and John Breckenridge in the South. There was also John Bell who was the of the Constitutional Union Party. What helped Lincoln further was that he only got 39% of the popular vote, but got 180 out of the 303 electoral vote. Douglas had 29% of the popular, but only got 12 electoral votes. This is how the electoral college helps in a Presidential race.
http://en.wikipedia.org/wiki/U.S._presidential_election,_1860