From Brewer's Dictionary of Phrase & Fable:-
The term has two almost contradictory senses. On the one hand, to second-guess is to appraise or criticise someone or something with hindsight, after the event. On the other hand it is simply to attempt to anticipate or predict what someone will do or what may happen.
Nowadays it seems to have mainly the second sense, especially when trying to work out what someone will do in order to prevent it or gain the upper hand.