In most polls, President Obama beats every possible Republican candidate when they are mentioned by name. However, a generic GOP candidate tops Obama.
When Gallup asked people if they would vote for Obama or the "Republican Party's candidate for president," the unnamed candidate won, 47%-39%. This is actually the second straight month Obama lost to the generic candidate. He topped the poll in May as his popularity spiked following the death of Osama bin Laden.
Gallup writes that it "typically uses this question format when a president is seeking re-election but his likely opponent is unknown."
In analyzing the data, Gallup concluded:
President Obama's re-election prospects do not look very favorable at this point -- if the election were held today, as measured by the generic presidential ballot. However, that result does not necessarily mean he is likely to be denied a second term in November 2012. At this point in 1991, George H.W. Bush looked like a sure bet to win a second term, but he was defeated...
However, the political environment can certainly change in the 16 months leading up to the election, something that occurred during the 1984 and 1996 election cycles (in the incumbent's favor) and 1992 cycle (in the opponent's favor) when incumbent presidents were seeking re-election.