Yesterday, the Google Talk team turned on offline messages on the Talk service. It works pretty much how you would expect - if you send a message to someone who is marked as Offline in your Friends list, they will receive that message the next time they log in to Google Talk, or in their Gmail inbox. There is one restriction - in order to receive offline messages, the recipient must have chat history archiving enabled, and not be off-the-record. If this is not the case, you will get the typical error " is offline and can't receive messages right now" when trying to send the message.
For XMPP clients using the Google Talk network, this feature is implemented in accordance with XEP-0160 (Best Practices for Handling Offline Messages).
You can read more about using the offline messaging feature at this help page.