not sure if this helps, but i had a problem with imap not syncing earlier today and here's how i fixed it:
1) go into settings -> applications -> manage applications
2) click "all"
3) find gmail and clear all data and cache
4) reopen gmail. it'll take a second to sync up, but when it did it fixed the problem completely for me
1) go into settings -> applications -> manage applications
2) click "all"
3) find gmail and clear all data and cache
4) reopen gmail. it'll take a second to sync up, but when it did it fixed the problem completely for me