Translation:You will do better in a few days.
From my knowledge, it starts with the general "Wie geht es dir?" - literally meaning "How's it going for you?" but actually expressing "How are you?" "How are you feeling?"..this is the same structure. Perhaps in the context of the doctor reassuring his patient: "In a couple of days you will feel better".
Is the "es" in this sentence used as a referential "it"?
No. The es in es geht, when talking about someone's health, does not refer to anything in particular.
It's similar to the "it" in weather verbs and expressions in English such as "it's raining" or "it's sunny".