Couldn't comment on the blog itself, but Gmail simply uses Google Closure and its compiler to get minified Javascript + DOM.
And it so happens that Closure code tends to create a ton of extra DOM structure within the JS code, so the 50-level-deep <div> tree isn't much of a surprise, especially with something as complex as the Gmail UI.