There appears to be no way to export contacts out of Mail and into an CSV file and thus gmail. Exporting iCal to Gmail was easy. Why not contacts?
Help, please.
This will do it. Apple added an API (Application Programming Interface) in Jaguar to allow third parties to interact with the Address Book. This developer wrote this export utility using the API.
http://www.gwenhiver.net/address-book-exporter.html
You can also use Automator to export the data in tab-delimited spreadsheet format. You can define what fields and what order you want them in when you export. Video tutorial, introduction to Automator:
http://www.twit.tv/mb3 --> MacBreak Video Podcast (search in iTunes to subscribe) This is an older episode and one of the best ever produced.
Likewise, Leopard's new ToDo integration in Mail, iCal, etc. will also have an API to allow third parties to integrate with the system wide ToDo feature.