I agree with Scramble. I'd only add that it can depend a bit on how the guest delivers the wine. Did they just hand you the bottle on the way in the door? Or did they give it to you and tell you about its rarity/quality ect.?
If it's an expensive wine, or one that the guest has indicated is special, then perhaps you save it, and thank them generously.
Otherwise, wine brought to a dinner party should be considered fair game for drinking on the spot.