Web applications that need to access services protected by a user's Google or Google Apps (hosted) account can do so using the Google Authentication service. This service lets web applications get access without ever handling their users' account login information. Many but not all Google services support the Authentication service; check first with the service you want to access.
For information on Google's account authorization solutions and choosing the right solution for your situation, see the Getting Started guide. See also the Google Accounts API Group for discussion on using the Accounts API.