If your Google Maps compass is off by 90 degrees, 180 degrees, or just acting a little weird, recalibrate your compass using this technique.
Make sure you do it for all three axes, and not just one.
Their technique has worked for me on several occasions after discovering it a month ago! Yay.