Web 2.0, which "happened" in late 2004 was mostly about user participation a la Wikipedia, Wordpress, etc. It was about tagging things a la del.icio.us.
Some JavaScript was used to do crazy things like show full-size images from clicking a thumbnail or making wysiwyg editors. But these thick-client "Single Page Apps" people build today didn't really take off until Backbone.js became popular in ~2010.
Re: Gmail. It won, not because of its slick JavaScript features (really, there weren't many when it came out in 2004). It won because of the impressive (at the time) storage space they gave you.