I've skipped a few elections along the way as being less-than optimal for comparison purposes. Also, 1828 is a significant election, as it marks the first election wherein a majority of the electors were chosen by "the people," i.e., state legislatures apportioned electoral votes according to popular vote tallies.
Unpopular incumbent. John Quincy Adams, the incumbent President, had managed to lose a significant amount of popularity by 1828. His vision of expanded federal exercise of power (particularly his ideas for creating a national university and astronomical observatory) had offended those who favored a more limited view of government. He was noted for being largely ineffective as a public speaker when addressing Congress. And, it should be noted, many felt his election was at the least tainted by the so-called "Corrupt Bargain" that gave Henry Clay the position of Secretary of State (then an important stepping-stone to the Presidency [HRC take note!]). Many of the same points could be about G.W. Bush in the recent election; the key point of difference here is that GWB was not running for re-election (claims of "McSame = 3rd Bush Term" notwithstanding) and JQA was standing for a second term.
Economic crisis. Both Andrew Jackson and Barack Obama benefitted from the appearance of a financial crisis at the time of the election. . JQA's decline in popularity (in particular his alienation of key Northern supporters such as Martin Van Buren) stemmed in part to his clueless handling of the debate over what was later termed the Tariff of Abominations. He had agreed to sign the tariff before the details were finalized; his opponents then tried to amend it to death, thus guaranteeing that there would be something in the final version to offend everyone (except for certain New England manufacturers). Jackson's people laid the blame for the ensuing rise in prices at JQA's feet. There may be a distinct parallel here to the subprime mortgage crisis, which some are blaming on Democratic legislators' efforts at pressuring banks into lending to "sub-optimal" clients, then blaming the Republican administration for failing to regulate the markets. (NB Jackson also blamed economic uncertainties on the existence of the Bank of the United States and excessive circulation of paper money, but those issues would not predominate until the 1832 campaign.)
Regional appeal. Jackson was a candidate of the fast-growing West and South. However, he was only able to win the election with the support of the Ohio Valley states and Pennsylvania --plus a majority of the then-proportionately-assigned New York electoral votes. Obama's regionalities have already been noted.
"Modern" campaign tactics. Jackson had spent the previous four years in the wilderness, letting his allies lay the groundwork for his 1828 attempt. John Eaton spent hours writing "anonymous" letters to friendly newspapers, calling Jackson the Washington of the West. Martin Van Buren (whom JQA had alienated) brought the tactics of internecine New York state politics to the national level, including the use of what Jackson would later call "rotation in office" --the spoils system. Jackson waged one of the most advanced campaigns of the antebellum era; JQA was at a disadvantage from the start. Jackson's people recognized the importance of mobilizing voter turnout. Obama spent years preparing to run and out-gunned all of his opponents in voter mobilization, particularly in the registration of new voters. Both candidates also were sure to use the endorsement of a former well-loved President to their advantage: Jackson's people used letters written by Jefferson in the early 1820s to bolster their case, while Obama's people --after the elimination of Hillary Clinton as a rival-- took pains to seem to court the opinion of Bill Clinton and use him in a more-or-less active campaign capacity (though not too active, lest he overshadow the current nominee).
"Democrats". Both candidates positioned themselves as the "people's candidate". For Jackson, this was especially significant in 1828, when for the first time a majority of white males over 21 were not only eligible to vote but had a direct role in choosing a state's electors. Jackson's margin of victory was 56% - 43%, a bit more than Obama's.
--Very busy of late. Had the house interior repainted to cover up the hurricane damage. Many arguments with the insurance company, then with Citimortgage over disbursement issues. Sick baby. Sick mommy. Sick Kaiser. Finals. Courses for next semester. Whiny students. All this and no duck hunting to balance my soul. Ugh ugh ugh.