Long and short, I got sick of the tedium in web development, quit my job and went back to school. The dot-com bubble had just burst, and I had been taking occasional classes including a very inspirational data structures course which planted the seed with formal proofs.
After I went back to school, I tutored in the math study center to pay the bills, which really helped cement not just the learning but also the notion that I could survive academia. I'd gone in with a plan to study engineering, but after I transferred to university, I kept dawdling on the math prerequisites and not taking the engineering courses that needed them. So it kinda gradually dawned on me that math was what I loved, and away I went.
I never strayed too far from computers. I'm a graph theorist, specializing in computation; had I known better I'd have gone into computer science because that's where I see the most progress being made.