Imagine that you have a steady state society, of 1,000 people. There are no technological advancements, there is no population growth, there is no growth. Each year, 12.5 people are born. Each year, 12.5 people die. The average age of death is 80.
Each year, each person needs to consume 10 widgets to live. Each year, a healthy, working-age person can produce 20 widgets.
This society can clearly sustain itself, as long as each person spends half of their life working. To keep things simple (And to stick it to the DINKs), let's pretend that everyone has children, and is responsible for raising them until they can start working.
How would this society operate?
Well, you'd spend the first 25 years of your life supported by your parent (Who would work for 25 years to support themselves and you). You'd then spend 25 years supporting yourself, and your child. You'd then spend 15 years hoarding widgets, so that you can support your retirement. You'd retire at 65, with 150 widgets in the bank, and die at 80.
Essentially, you spend 40 years of life as a maker (Who can support two people in this time), and 40 years of your life as a taker (Who requires half of a maker's economic output to support them).
Everything works out wonderfully, and nobody needs a pension! Just save all the surplus you make between ages 50 and 65, and retire..! Except that there's two important differences between this abstraction, and the real world.
1. You can't hoard widgets in the real world. Goods have a very limited shelf life. Money gets eaten by inflation.
2. Even if the average age of death is 80, most people aren't average. If you were solely reliant on your personal hoard of widgets (Which was consumed away by spoilage/inflation) to see yourself through old age, you might still run out of widgets, because you happened to live till 83. Or you might have dropped dead two years after you retired - and thus all your savings would go to naught.
Pensions (Or social security, or some other similar instrument) are a solution to this problem. They solve the spoilage and inflation problem, by having your retired life being subsidized by widgets produced today (So they did not drop in value). They solve the 'average person' problem by pooling the risk, so that the very occasional person who happens to live to 90 doesn't go broke. They don't actually require any GDP growth, to work. What they do require is:
1. The same widget created today being more valuable than a 20-year old widget. (Due to spoilage or inflation. If we didn't have spoilage or inflation, we wouldn't need pensions.)
2. Proper levels of funding. The math for # of years worked, and # of years not worked has to add up.
3. There to not be GDP shrinkage. Things get problematic if your gdp or working population shrinks (Whether long-term, or short-term) - in that situation, pensioners have to take a haircut.
Since #1 is a given of the world we live in, and you are not asking about #3, all you need to handle correctly is #2.