In 1955, it was obvious to the meanest intelligence that Southern politics would be dominated by segregationist Democrats for at least the rest of the century.
In 1905, Americans moving to Mexico outnumbered Mexicans moving to the US. To the best of my knowledge, nobody speculated that this would reverse five years later.
In the 1950s, Arthur C. Clarke and other British sf writers took for granted that England would remain a world power and would be a leading power in space. By then, it was no longer a major power. (And yes, I mean "England" rather than "United Kingdom." Ask your friendly neighborhood Scottish Nationalist or Welsh Nationalist for the explanation.)
In 1987, Michael F. Flynn's In the Country of the Blind -- set at an indefinite time in the 21st century -- had the Soviet Union as part of the background. (Analog, October and November 1987.) The novel relied on the assumption that social prediction could be an exact science.
In 1988, Flynn had a two-part article which made it clear that he really believed this. ("The State of Psychohistory," Analog, April and May 1988.) The article contained projections for (among other countries) the Soviet Union well into the future.
[In 2003, Tor published a revised version of the novel. The Soviet Union had disappeared from the revision. A revised version of the article was included; it had no mention that the original version had been overoptimistic about the Soviet Union's health. I'm not yet certain whether the 1990 Baen version and the 1993 Pan version of the novel had been updated.]
How can an sf writer avoid getting future politics too far wrong? It's not possible to avoid all mistakes, but there are ways to minimize them.
1. Look to see what's already happened. In the US, the post-WWII baby boom is generally considered to have begun in 1946. By 1948, it should have been obvious that American high schools would have to cope with much larger numbers of students; and that American colleges would have the same problem a few years farther down the road.
In the UK, the post-war continuation of food rationing ought to have been a strong clue that one was not living in a world-power country.
2. Assume that everything which looks strong may be weaker than any sane person imagines. An important industry can become minor. One country's dominance in an economic sector can disappear. Any political party can go the way of the Liberal Party in England, or the Italian Communist Party.
3. Do not read National Review for facts about American politics. Don't read The Nation, The New Republic, or Reason for facts, either. These are magazines of opinion, not magazines of fact.
On the other hand, blogs of opinion are currently better at finding some facts than newspapers and other traditional news media. (For a quick introduction to some blogs worth watching, see http://politicalwire.com/southpaws
The equivalent is probably true in other countries.
4. Look for American political news at the state level and lower. That's where national changes start. (http://stateline.org has state political headlines and summaries with links to newspapers. http://polstate.com has reports from individuals.)
5. If you're sure you understand another country's politics: pray for humility, have your medication adjusted, or take some other action to reduce your level of certainty. In extreme cases, place large bets on the next election there. (For US and UK elections, see http://tradesports.com.)