Very common error this one (Database connection error). What it means is, Wordpress lost connection to its database, therefore it cannot pull any content or render the pages.
The issue is of high severity and critical when it happens.
The issue is generated due to a faulty SQL server setup (host to blame).
Few solutions to solve it. If it happens again you need to contact the host, if it looks permanent you need to restore an older working backup. Just to note, it can only get worse after that.
More issues will come up on this host that can’t set up its servers (e.g. Hostgator). It’s time to consider changing to a more reliable host like Namecheap (excellent support, no downtime, no database errors).