This was during the Tom Baker years, but I don't recall who his companion was during this arc. It takes place on a human (I think) colony that, though in the future, functions as a feudal society and is based on medieval England. In this particular episode the Doctor, a spoiled prince and a third man are holding cups of some sort of ceremonial wine, and shortly after drinking it all three pass out.
I believe you are thinking of the 4th serial of Season 16: The Androids of Tara which was first broadcast on 25 Nov 1978. It features Tom Baker as the 4th Doctor and Mary Tamm as his companion Romana. It takes place on the planet Tara, described as a feudal society with electronic weapons and androids.
The first episode includes a scene where the Doctor, a prince and two others drink wine and pass out. It is described in the Chakoteya transcript like this:
(Farrah returns with a tray with a flagon and goblets.)
REYNART: Pity. Still, you will stay and drink a toast to our success for tomorrow, won't you?
DOCTOR: All right.
REYNART: One of our local wines. Modest, demure, but palatable. Join us, Farrah.
FARRAH: Thank you, your Highness.
DOCTOR: You look better without your helmet.
FARRAH: Cooler, anyway.
ZADEK: With your permission, your Highness. To the King.
DOCTOR: To the King.
FARRAH: To the King.
REYNART: Not yet. Tomorrow, perhaps, thanks to the Doctor.
(Reynart refills the Doctor's goblet.)
DOCTOR: Thank you.
FARRAH: To the Doctor.
REYNART: The Doctor.
(Reynart takes one mouthful and stops.)
FARRAH: Your Highness?
(Reynart falls forward over the table, then Farrah tries to draw his rapier and collapses, and Zadek falls across a chair.)
DOCTOR: Potent stuff.
(The Doctor staggers to the door, opens it, then collapses at the feet of Count Grendel.)
In "The Brain of Morbius," the Doctor (and Sarah-Jane Smith—but she does not drink any and only feigns unconsciousness) are given drugged wine by the villain Solon, because Solon wants the Doctor's Time Lord head for the new body he is making for the former Time Lord dictator Morbius.
The story certainly has a medieval look, in spite of taking place on the distant planet Karn. The incident with the wine can be seen here, near the end of episode one, starting at about 18:50.
I was a bit surprised to see that the Doctor Who Wiki has a page on "Wine," which describes several other instances of drugged wine from the show, but none that are any where close to the situation described in the question.