I have gaps in between every job I've ever held, but those gaps are strategic. In them, I figure out what I really want to do, and whether I have the tools to do what I really want to do. I applied to YC's first class of S05, as I was finishing up college. I didn't get in. I figured that if investors wouldn't talk to me, I'd learn how to do a bootstrapped startup, so I went to work for a bootstrapped financial software startup. After 2 years there, I quit and founded my own bootstrapped startup, this time in Web 2.0 casual games. It failed too. In examining the failure, I figured that I lacked enough real-world experience to understand what the real markets were, I'd exhausted my pool of potential co-founders, and I had this continuing anxiety about how to do software development "the right way" and make programs that scale. So I moved out to California to work for Google Search. I'm on my own again, but I got everything out of Google that I hoped to get out of it (and more!).
If you're doing it right, each job is an opportunity to get a lot more than money. It's a chance to build technical experience, to challenge yourself, to look at how people with way more experience than you make decisions, to understand how an industry works, and to see how an organization fits together.
It reminds me of my favorite quote from one of the best books about building any type of "Professional Services" company:
"The health of your career is not dependent so much on the volume of business you do, but the type of work you do (whether or not it helps you learn, grow and develop), and who you do it for (whether or not you are increasingly earning the trust of some key clients). In any profession, the pattern of assignments you work on is the professional development process - you just have to learn how to manage it."