IceSpear is exactly right. Coakley has been running a good campaign this year. The fundamentals favor Baker because he's also running a good campaign. The only Dem to be elected governor since 1986 was able to succeed because he summoned into being a massive power base outside of the Dem hierarchy. You pretty much need to do that to succeed against a party all too happy to work with a reasonable Republican, especially against a woman.
I'd say Baker has run a much stronger campaign (which is why he's winning), particularly in comparison to his failed 2010 run.