I would say that you were unreasonable to cut the customer off and shut them down but you're not going to be sacked for it - anyone (repeatedly) demanding a worker is fired over something this minor will be showing management how unreasonable they are and management have all dealt with customers like this before so yes there will be a consequence (IE you're spoken to about your customer service) but you're not getting sacked.
I worked in customer services for a supermarket and now work in our pharmacy and the worst thing you can do when someone is asking a question is cut them off to shut them down. Even if you think you know what they're going to ask, if you cut them off then people assume you're not listening/are being rude because you don't want to deal with them and it often takes longer in the end as they will then just plow on with whatever they were going to say initially anyway, and you just repeat yourself at the end that you can't help right now, which makes them madder than if you'd let them finish before saying "Sorry but there's nothing I can do right now".
In your initial conversation in your situation I would have tried to get in first - so as soon as she walked through the door I would have called out something like "Just to let you know we close in two minutes, is there something I can help you with now?" and then when she started talking about her membership, as soon as you knew she wanted to do something you were unable to do there and then (as opposed to a quick "I have a membership, was at the members only swim session earlier and think I left my green bobble hat, do you have a lost property box?") that's when you could interrupt with "Apologies but as I said when you arrived we are closing now so I can't access the membership system right now, you can either come back tomorrow or leave your number and I can call you, which would you prefer?".
However, in the situation you were in where you didn't get in early, when you interrupted I would have explained why I was interrupting, explain what I can do and what I can't do there and then and ask what they need, eg:
"I just got a membership recently ..."
"Apologies for interrupting you but I can see you're on a call and just to save you time if it's something I can't address this evening as we are closing in two minutes: if your question is a general one about the centre/facilities I can answer it now but if it's about your membership details then unfortunately the system is shut down so I won't be able to check any details now, you'll have to come back tomorrow. Is there something I can help you with now? ... No? Then we reopen at 9 tomorrow if you want to pop in or should I write our phone number down so you can call us instead?"