'Old' can sometimes be used as a meaningless intensifier alongside another adjective. For example, you might hear people say 'Good old Mary! You can always rely on her" or "Silly old me, that was a stupid mistake", where 'old' has nothing to do with the person's age: it simply reinforces the adjective.
Here, 'a grand old time' just means 'a really grand time'. 'Grand' here means 'excellent/very enjoyable'.
Do you know an old cartoon series called The Flintstones, about a stone-age family? The signature tune refrain, which every cartoon fan has known for last 60 years, is "We'll have a gay old time", which means "We'll have a lot of fun". Nothing to do with the modern meaning of 'gay' (the 'real' meaning is 'happy and light-hearted') and nothing to do with being old (apart from the joke about the prehistory).
Note that this is rather outdated language. You're more likely to come across it in books and old films rather than in everyday conversation.