The answer is found in the source of the wine. If it was produced by non-Jews it was not kosher.
If wine is not produced under special care by people who are shomer
Shabbos (observant Jews), it will be forbidden as stam yayin
(possibly offered to idols). Therefore, wine vinegar requires
hashgachah (proper supervision) to ensure that the wine it was made from was kosher.
Looking at the context, when Mark first says "they gave him wine..." the subject of the sentence refers to those who brought him to Golgotha: Roman soldiers. In the second instance, one of the bystanders runs and retrieves the wine. These onlookers were clearly Jewish because they understood him to be calling for Elijah, and the one who runs to get the wine even wonders if Elijah might actually appear. Thus, being brought from another location by Jews, rather than given to him on the scene by Roman soldiers, this wine was probably kosher.
Also, if the "wine" offered by the Roman soldiers was their normal beverage, namely posca, this was mostly vinegar and water, and thus less palatable that actual wine - especially to Jews.
Conclusion: In first case the wine was offered by Roman soldiers and was not likely to be kosher. In the second case it was different wine, offered by a fellow Jew, and Jesus was will to accept it.
ADDENDUM: If it is objected that this interpretation contradicts Jesus' statement that a man is not defiled by what goes into his mouth (Matthew 15:11), this saying refers to the issue of hand-washing before meals. There is no evidence that Jesus ever consumed foods or drink forbidden by Jewish tradition.