Tough to answer without knowing the guy. Here are some possibilities:
1. Something has intervened in his life between now and then that has nothing to do with you (new girlfriend, grief (lost a loved one?), sense of inadequacy (financial troubles, etc.)...
2. He has a relationship already, and only intended to "innocently" flirt with you. Once it reached the point of actually "doing" something (like going out), you've reached a line he doesn't want to cross.
3. He lacks social skills and is unable to take it to the next level.
4. He's intimidated by you. He's relatively secure at the office (work is one of the two areas where a man get's his sense of self-esteem), but to reach beyond that safety zone frightens him.
5. He's insecure of his masculinity and needed you to give it a boost. Flirting with you successfully, to the point you actually agree to go out, gives him a "conquest" that feeds his tender ego. (Most guys get this from a sexual conquest, but if he's really insecure he'd be afraid to go that far. Success at flirting is all he thinks he's capable of, and he's guarding his ego from future failure by trying to go further.)
6. He has a pedastal complex. He's put you on a pedastal, an image of wonder and purity that should be inviolate. For you to go out with him might lead to physical affection, which would sully your image.
7. He has an inverse pedastal complex. He has an image of you that is... well, sleazy (it's a reflection of how he sees himself). By agreeing to go out with him, you've affirmed his sleazy image and he's no longer interested (other than checking from time to time to reassure himself he's right.)
8. He may be gay and the office flirting was a cover.
9. Any of these things in combination.
I'm not sure which one, but I'd give you 90% that he fits at least one of these categories.