Okay, traced it further. Gallery, you've got it installed somewhere I think. "view_album.php" was what they exploited to gain access. I'm not quite sure exactly what they did, but basically it used a hole in that script to start their own process. It downloaded more hacks and ran them. As far as I can tell, they just phoned home reporting their runtime environment (such as OS version and software that they ran under) to a few thousand emails. Doesn't look like anything much was compromised, as this didn't seem to get beyond the automated/worm stage. After forensics, I killed all the running processes and deleted the downloaded files (that I could find.) Keep an eye out for odd stuff (like files) that you didn't install. Effectively, they had the same access/permissions as you yourself do, so they could have harmed/changed anything you can. You say your password isn't working? Try it again. The errors you got were actually due to safeguards I have in place. Everyone has limits on the number of programs they can run at once. The hacks took up all those slots, likely preventing you from even running email or logins. Now that they're dead, it should work again. If not, it's possible the hack(ers) changed your password. Let me know if that's the case.
Oh, and upgrade or disable gallery ASAP.