And even then, gmail wasn't really written in javascript. They compiled Java down to JavaScript because JS itself was such a pain to deal with natively.
Do you have a source for this? Google did create a Java to JavaScript compiler/web framework: GWT but as far as I understood this was never used by the Gmail team. In fact, I heard there was pushback against using this on Gmail.
Angular definitely did not catch on for google properties until much much later. Back when I did nothing but backbone/angular consulting, none of the major google properties used angular.