Yes, I've actually had it happen a few times after changing roms and kernels. If you log on with a computer, you will see the emails that are not syncing properly.
What I found was that sometimes, if I deleted an email WITHOUT opening it first, it would be removed from the phone, but the gmail server would still list it as an unread email.
If you go into settings>applications>manage applications tap the all tab and find gmail. Then tap clear cache and clear data.
This should fix the problems. This usually will fix issues with many apps, but a good prevention is to open the email before deleting it. I don't know why this is an issue sometimes.