The dog days of summer have their origins in astronomy. The brightest star in the night sky has the Greek name Sirius (“sparkling” or “scorching”). It is also known as the Dog Star, being the chief star in the constellation which the Greeks fancifully thought of as one of the hunter Orion's dogs. Sirius passes through a period when it is not visible because it rises and sets during daylight. But at a certain point during the summer, usually sometime in July, it is seen again just before dawn. This coincides with the hottest part of the year, so the Romans blamed the star for the weather, calling the forty days following its appearance the “dog days”.
The Dog Star suffered from a bad rap: the Egyptians believed that its rising caused the Nile to flood, and the Romans blamed it for all sorts of pernicious things as well as the unbearable heat. It was generally believed also that it drove dogs mad, and as late as the 16th century people were even advised not to have sex during the dog days! In English, this benighted time of year was first known, about 1400, as the "canicular days", from the Latin canicula (little dog). Even today in French the word for "heat wave" is la canicule. The simpler "dog days" doesn't show up until 1538.
P.S. If you find the English language fascinating, you might enjoy regular updates about English usage and word origins from Wordlady. Receive every new post delivered right to your inbox! If you are not already subscribed, you can either:
use the subscribe window at the top of this page
(if you are reading this on a mobile device): send me an email with the subject line SUBSCRIBE at firstname.lastname@example.org
Follow me on twitter: @thewordlady