I've had decent experiences with Roundcube, if you're looking for a more AJAX-driven client; The versions I've tested were a bit buggy, but that was a few years back, I'm sure it's improved by now.
http://roundcube.net/
Webmail is, I think, a substantially "easier" problem (with the caveat that this is mainly for technically proficient users)
I use gmail for email hosting but it all routes through a domain I control, so if Google one day goes crazy, I can switch out of gmail. (And IMAP is well understood so I could also copy it off), whereas things like my facebook friends are much harder to migrate.
> IMAP is well understood so I could also copy it off
It's probably a good idea to start those backups now with something like offlineimap. You don't want to wait until Google 'goes crazy' or your account is randomly suspended.
Just in case anyone ever wants to be cool like me, I actually sync all my email using Windows Mail (yah, I know, I'm not very cool), which means it shows up in my desktop search as well as in gmail.
Just in general, the backup strategy of storing things in at least two places is the only way to go, and simply knowing in the abstract that I could backup my data if I so chose is meaningless. Make a cron job, sync your home directory, whatever floats your boat, just do it.
(I work at Google, and I am consistently surprised by the amount of effort people put into portability. I think this is important and underappreciated)
Depends on what you're looking for in Gmail. Currently Gmail is the only way to have 'tags' supported. If you truly wanted a similar experience from your email, you'd need a backend that supported tags as well as a web frontend.
That said SquirrelMail, Horde and RoundCube are all open-source webmail apps off the top of my head. RoundCube being the AJAX-y Gmail-ish one.