I had this happen to me with a Christmas quilt I made this year. I skimped and didn't use as many pins as I usually do and I paid the price. The quilt I just finished pin basting last night has TONS of pins in it because I never want to have to do all that ripping out again.
It may have been that you didn't have enough pins or basting stitches or maybe it was the batting... I had one that scooted quite a bit (I think it had more poly than cotton in it).
Once I had a quilt that was quilting perfectly (on top). I turned it over and realized that the backing had GRABBED a scrap of fabric and that piece got quilted right in with the backing. WHAT A MESS!