To provide closure to those who may be currently experiencing this intermittent issue (see Broken gravatars in chat and on main site), broken Gravatar avatars are many times the result of server issues on Gravatar's end.
Gravatar serves approximately ~20 billion images per day across their user's accounts. If each avatar file size is 5 KB, Gravatar expends to the upwards of 95 TB of data transfer daily, not accounting for new avatar uploads or other server operations. Bottom line - issues are bound to occur. Luckily, their server engineers are typically quick to resolve these issues.
Should you be currently experiencing an issue with Gravatar-generated avatars on Stack Overflow, your best option is to contact them via their support website. Otherwise, just wait it out until it's been resolved.