One of the things I have wanted to do with my iPhone was to be able to view archived google talk chats via the device. If you are using imap, go to "Labels" under your Gmail settings you will see "Chats" but no way to select "Show in IMAP" Here is my "almost" workaround.
Once you have logged into your gmail account, click "Create a filter" (next to the search mail button) in the subject field place "Chat with" and click the "Next Step" button, check "Apply the label" and make a new label named "iChat" check "Also apply filter to X number of Conversations below." and click "Create Filter"
Then go to "Settings", "Labs" and make sure that you have "Advanced IMAP Controls" enabled for your account, and that you have chats set to archive. Look under "Settings" "Chat" and select "Save chat history"
Now go back to "Settings", "Labels" and check that your new "iChat" label is set to "Show in IMAP"
On your iPhone you should now see your iChats folder when you open the email app and your chats,
Check it out and tell me if it works for you, as I am only seeing some of my chats.