SHORT ANSWER
There are conflicting views as to what almost led to the death of Augustus in early 23 BC. It is unlikely that we will ever know for sure, but the main suspects are liver problems, a fever or plague afflicting Rome at the time or a combination of life-long health problems and stress.
FULL ANSWER
1. Liver problems. Suetonius connects Augustus’ illness to his liver:
All his life he experienced at certain times dangerous fits of
sickness, especially after the conquest of Cantabria; when, his liver
being injured by a defluxion upon it, he was thrown into such great
discomfort that he was obliged to undergo a desperate and doubtful
methos of cure: for warm applications having no effect, his physician
Antonius Musa, recommended the use of cold.
Source: Suetonius' Lives of the Twelve Caesars' (trans: H. M. Bird)
2. A fever or disease, possibly the same as the one afflicting Rome at the time. Anthony Everitt, in Augustus: The Life of Rome’s First Emperor notes that
It has been suggested that Augustus was, in fact, suffering from
typhoid fever, which could well have been the cause of the epidemic
devastating Rome at the time; cold packs were a well-known treatment
for the disease in the nineteenth and early twentieth centuries.
Later the same year, Augustus’ nephew Marcellus fell ill. He was given the same treatment by the same doctor (Musa) as his uncle but did not survive. Musa must have seen similar symptoms and Rome was in the grip of an epidemic so it wouldn’t be a surprise if uncle and nephew got it too (whatever it was). On the other hand, if uncle and nephew suffered from the same illness, it seems strange that the younger, healthier man should die – but then Augustus lived to the then ripe old age of 75 so he must have been pretty tough despite all his afflictions.
3. A combination of work stress and a lifetime of poor health. Werner Eck, in The Age of Augustus suggests that Augustus’ illness may have been work-related.
It was a time of extreme stress for Augustus. Finding the right path
in the elaborate and complex new system was not easy, and he was
learning along with the others. It would not be surprising if the
demands on him were the cause of the serious illness he developed in
the late spring of 23 BC.
Although Eck cites no evidence, the stress of running an empire is a possible contributory factor if we consider that Augustus had a life-time of health problems.
His health was poor; he suffered from nervous indisposition and chills
and could abide neither heat nor cold. He wore four tunics and a thick
toga and never went without a hat.
Source: T. Mommsen et al, ‘A History of Rome under the Emperors’
Postscript
Whatever it was that afflicted the emperor, Augustus recovered against all expectations. According to Everitt, he had not expected to live so
He gathered around his bedside the officers of state and leading
senators and equites. He spoke to them on matters of public policy and
handed his fellow consul, Gnaeus Calpurnius Piso, the breviarium
imperii, a book that recorded the empire’s financial and military
resources.... the dying man handed Agrippa the symbol of his
authority: his signet ring bearing the head of Alexander the Great.
Other sources
The Cambridge History of Greek and Roman Warfare
Anthony A. Barrett, 'Agrippina'
The Cambridge Ancient History, vol. X