Like July, this is another month name that is not a tribute to a Roman deity, but an emperor. In its origin, August was the sixth month of the year, when Numa Pompilius had not yet added the months of January and February to the year – something around the year 700 BC.
From the Latin name sextili, in the twenty-fourth year before Christ it was renamed Augustus. Thus, the Emperor Octavius Augustus imitated, twenty-one years later, Julius Caesar, who gave his name to the previous month.
Emperor Octavius Augustus considered that his month needed the same importance as July, as it had only twenty-nine days. To fix it, he changed the length of several months, changing a few days until August reached thirty-one days. This is why more than two thousand years later the two months have thirty-one days.
Source: August