I came across this issue recently where I needed to change a Gmail's account password programmatically and am still thinking about the ideal approach.
Basically by providing Gmail's current username/password my application would then authenticate and request the password to be changed to a new one provided and return success.
CURL seems to be the obvious choice as I usually work with PHP, but I have also been looking into other possibilities like libgmailer, Sikuli, or scRUBYt! (although not sure you can post with the this).
Thanks!
There is no reliable solution for this. If you use curl - that's ok, but you will have tu support the application forever.
Also, you will need to handle captcha ;-)
Anything except changin password is possible via API, but not this, AFAIK.