I think this is an example of how the experience of gmail can sort-of trivialize the problems associated with undoing events. How many actions are there in gmail? Not that many, and it took me 15 seconds of testing to find this message:
"The contact has been deleted."
Without an undo button (!!!). Undoing is quite a bit more complicated in, say, a word processor where the different actions are absolutely choked with side effects. Everything needs to know how to undo itself, hold its state (as well as application state, where appropriate), sit on a stack waiting for ctrl-Z. In addition, certain things (like backspacing numerous characters) need to be able to "fold" together to work correctly. Webapp programmers generally haven't had to worry about this like desktop programmers...