Yes. Typically, candidates recieve intelligence briefings as soon as they secure their nomination:
The Obama administration is discussing the final details with the Mitt Romney campaign of how and when the first intelligence and national security briefings will be offered to the presidential candidate and his designated campaign officials. Traditionally, candidates are offered such briefings by a sitting administration as soon as a nominating convention is over. http://security.blogs.cnn.com/2012/08/30/romney-to-get-intelligence-briefings/
Apparently, vice presidential candidates receive briefings as well.
The briefings are a courtesy, and the administration only gives as much information as they deem fit. The typical justification is not so candidates can tailor their positions to the intelligence, but to prevent them from saying something that could jeopardize national security.
As for your hypothetical about a presidential candidate being blindsided by intelligence after taking office, it has occured. Kennedy, for example, slammed the Republicans for doing nothing about Fidel Castro and ran on a platform of "strengthen[ing] the non-Batista democratic anti-Castro forces in exile." Upon his election, one of his first briefings was learning that the Eisenhower administration had been planning the Bay of Pigs for years. However, he didn't like the plan, and withheld the air support that had been promised to the Cuban revolutionaries.
In a more debatable example, Senator Barack Obama ran on repealing a number of Bush-era national security policies but left many in place, possibly because of intelligence he received after the election. Take the denial of habeas corpus rights to Guantanamo detainees. Only four months into office, President Obama was signaling that some prisoners would likely never face trial, contrary to his election promises. The haste of his reversal makes it likely that he changed his mind because of something he learned once in office.