The definitive answer is...maybe. Well, you say - that's no help!
OK then, here's the scoop:
- If you asked someone to bring a wine for the dinner - then you should open it. Either before, during or after the meal, wherever you believe the wine will best pair.
- If they ask you to open it. A really good wino friend would not put you in this spot, and it can be difficult if you've have carefully planned the wines for the evening. But you can always open one more bottle, and point it out to your other guests as a treat provided by the bearer of the gift.
- But... if the wine is truly a gift, then treat it like one. Say thanks, ask a question or two about it, then put it away to enjoy later. If the gift was a box of chocolates, you would not be expected to tear into them right away or if the gift was a set of beautiful Moroccan spices you would not be expected to douse your dinner with them. Much the same for a true gift of wine - for you to enjoy when and where (and with who) you choose.