I had been receiving the gears-manifest.php failed, status code 502 when I tried to update gears. I then tried changing the permissions for that file to 755 but I still got the error. Then I went and changed the file permissions to 777 and now it's working.
Hope that helps someone.