A Google engineering team started an internal 'organization' dedicated to this called the Data Liberation Front. They are working through all the Google products and will continue to update their site as new or improved methods for moving data in and out of their web applications are created.
The DLF sees themselves as being a bit subversive, because a company doesn't usually make it easier for their customers to leave. You can read about how they started and why on their FAQ
I have had success using IMAP Tools to backup other (non-Gmail) IMAP accounts. I used both imapdump.pl and IMAPToMbox.pl; they generate one text file per email or one text file per folder, respectively. Both commands allow specifying which IMAP folders (Gmail's tags) you want to back up.
This method suits me well, 'cause I can backup my account automatically (say, a cron job) without my intervention.
I access Gmail with a mail client which stores email in the maildir format. Maildir simply stores each email in its original RFC822 message format in a separate file. These are readable text files, although modern email is often cluttered with base64 encoded mail attachments.
There are multiple gnu/linux email clients which support maildir, including Evolution which is the standard mail client in the Ubuntu distribution. However, there are no Windows email clients supporting maildir that I know of.
I am one of the authors of BackupGoo. We also wanted to have a secure offline copy of our data. BackupGoo is really simple to use and backups all your stuff from Google to your local harddrive in widely-used formats. This includes e.g. GMail, Google Docs, Google Reader. GMail for instance is saved as plain text "Mime-Message" that can be viewed in any text editor or offline email client.
Import the set of email messages that you want to export in Mozilla Thunderbird by establishing a IMAP link. Install the ImportExportTools add-on and use it to export the messages locally to HTML or EML. The add-on will create a single file for each message as well as an HTML index page that makes it easier to locate specific emails.
Best way to save one email , (if its an html mail which is informative and you want to save it for future reference this method works like a charm) , Just open the gmail inbox and beside top right corner you have 2 signs "Printer" and "In new window" (just on the right side of email subject small icons )
Click on "in new window" this will open the mail as a seperate webpage , Now you can either print it or you can save the whole page as picture using a firefox addon (works for IE and Crome also) "Fireshot" , download and install it and press Ctrl+Atl+Shift+Z to save the whole page as an image / pdf
press Ctrl A and select the whole page , Paste the content in either Microsoft Front page or any html editor and save it as a web page. (or paste it in Notepad++ to save it as text)