OMG! I haven't seen one of those errors for a very long time. Well, it's bad news, that's for sure. It actually means that your server may be way too slow. Let me explain what goes on. When you try to install a component, Joomla! has to move the uploaded file to the tmp directory, extract it, copy the files from the tmp directory to their final location and, finally, execute the SQL commands and the PHP installation script. All of this requires a lot of time - on some slow hosts that could be 20-40 seconds.
Pause here. Joomla! opens a database connection when it spawns (in our installation case, right before it's starting to move the uploaded file to the temporary directory). Then, this database connection is idle for those 20-40 seconds Joomla! takes to copy around files. Hold that thought and let's proceed.
Some hosts -apparently yours is one of them- will forcibly close a database connection if it's idle for a "long" time. On mosts hosts that's a huge amount of time, 30 seconds or more, and you never notice. Some low quality hosts set this to an unrealistically low amount of time, usually in the vicinity of 1 to 5 seconds. When the database connection is closed, any subsequent attempt to use the database will result to the spooky "MySQL server has gone away" errors.
Now that you have all the puzzle pieces, it's easy to realise what's going wrong. Joomla! takes a lot of time to copy the files because your host is slow and this causes your host to close the database connection which causes Joomla! to fail the installation with this error message. The two remedies are to decrease the time Joomla! takes to install the extension or increase the timeout limit for database connections. Since the host's speed is fixed, the first workaround can only be achieved by using the manual installation method but, obviously, this doesn't apply in your case. So we're left with the second option. You have to ask your host to increase the time before an idle database connection is closed to 30 seconds or more.
My advice: find a decent host. The root cause of this issue is that you have a s-l-o-w host. This is usually an indication of an overcrowded server. Having a slow server can have some unforeseen consequences to your site, like ranking low on search engines (fast sites rank better, at least with Google) and many visitor bounces. My personal experience shows that a site which loads 1 second faster can lead to a decrease in bounce rate and visitors who spend less than 10 seconds on your site by a staggering 8-10%. Well, ultimately it's your choice :)
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!