MindlessCode.net: Export Gallery2 to Flickr
I recently needed to move a photo gallery using Gallery 2 to Flickr. Unfortunately there was no script to import all my albums into Flickr. So, I wrote something that sort of resembles a PHP script and might be useful to you all.
Unless you have a very small gallery, then you'll probably want to get a Flickr Pro Account. Free accounts are limited to 3 sets (albums), 20MB of upload per month, and 200 visible photos in your photostream. Pro accounts can upload up to 2GB/month and have unlimited sets and photos. It's about $25/year, last time I checked. You can upgrade from here.
Download one of these files, extract it, and then read the comments in export-gallery.php. It should get you started.