In Goblet of Fire we find butterbeer available to students in Hogwarts several times:
At the party after Harry's name is picked out of the goblet:
Harry couldn’t get away; whenever he tried to sidle over to the staircase up to the dormitories, the crowd around him closed ranks, forcing another butterbeer on him, stuffing crisps and peanuts into his hands....
At the party after the First Task:
Sure enough, when they entered the Gryffindor common room it exploded with cheers and yells again. There were mountains of cakes and flagons of pumpkin juice and butterbeer on every surface;
At the Yule Ball:
“How’s it going?” Harry asked Ron, sitting down and opening a bottle of butterbeer.
Krum had just arrived at their table clutching two butterbeers.
Throughout the remainder of the series we find butterbeer at many parties in Gryffindor Tower. Even if Hogwarts doesn't officially serve it (except perhaps at special occasions like the Yule Ball), it is obviously not very hard to come by (probably just go to the kitchens and ask for some). It is referred to as "black-market butterbeers" by the planning of the end of exams party in Order of the Phoenix but that doesn't seem to have made it difficult to procure.
This being the case, why in Prisoner of Azkaban was Lupin so sure that Harry would have never tried butterbeer before just because he couldn't go to Hogsmeade?
“I have complete confidence in you,” said Lupin, smiling. “Here — you’ve earned a drink — something from the Three Broomsticks. You won’t have tried it before — ”
He pulled two bottles out of his briefcase.
“Butterbeer!” said Harry, without thinking. “Yeah, I like that stuff!”
Lupin raised an eyebrow.
“Oh — Ron and Hermione brought me some back from Hogsmeade,” Harry lied quickly.
Wouldn't it be very plausible and believable that Harry had once had butterbeer in Hogwarts? Indeed, Lupin of all people would know how easy it is to raid the kitchens, having been best friends with James Potter who routinely did so, as mentioned in Philosopher's Stone:
“Ah — your father happened to leave it in my possession, and I thought you might like it.” Dumbledore’s eyes twinkled. “Useful things ... your father used it mainly for sneaking off to the kitchens to steal food when he was here.”
Lest anyone suggest that butterbeer in Hogwarts only started in Goblet of Fire, we already find it at a party in Prisoner of Azkaban after the Quidditch match against Ravenclaw:
Fred and George Weasley disappeared for a couple of hours and returned with armfuls of bottles of butterbeer, pumpkin fizz, and several bags full of Honeydukes sweets.
I am assuming that the butterbeer at parties comes from within Hogwarts, not from Hogsmeade. I am assuming this because it seems entirely implausible that Fred and George are going illegally to the Three Broomsticks when anyone there can see that they are students, and especially in Prisoner of Azkaban when Hogsmeade is under dementor patrol after sundown. Moreover it would be nearly impossible to carry enough back for the entire Gryffindor house, even if they didn't have to go through a "very narrow, low, earthy passageway" that takes ages to get through and then climb up a stone slide. Not to mention that Fred and George would have no reason to pay for the entire house's food and drinks, even if they could afford it (which they certainly can't). As Fred explicitly states in Order of the Phoenix regarding the 25 butterbeers at the first DA meeting:
“Cheers,” said Fred, handing them out. “Cough up, everyone, I haven’t got enough gold for all of these...”
Additionally, it is clear from several passages in Goblet of Fire that the parties are sourced from the kitchens:
“Well, we’d better get downstairs for your surprise party, Harry — Fred and George should have nicked enough food from the kitchens by now.”
Hermione took a jam tart. Then she said, “Did you get all this from the kitchens, Fred?”
“Yep,” said Fred, grinning at her. He put on a high- pitched squeak and imitated a house-elf. “ ‘Anything we can get you, sir, anything at all!’ They’re dead helpful ... get me a roast ox if I said I was peckish.”
“You know what?” said Ron, once he, Hermione, and Harry had left the kitchens behind and were climbing the steps into the entrance hall again. “All these years I’ve been really impressed with Fred and George, nicking food from the kitchens — well, it’s not exactly difficult, is it? They can’t wait to give it away!”