I asked this to one of my friends and he said "ein Glas Wein" in this sentence is completely correct. In this case, there is no need something similar to "of" between "glass" and "wine".
An "of" equivalent is only used in German when referring to an object that was mentioned previously or if it is obvious which object is being referred to. So, while the following sentences are all generic and all don't use "of" at all:
Ein Glas Bier. - A glass of beer.
Eine Scheibe Brot. - A slice of bread.
Einhundert Gramm Leberwurst. - A hundred grams of liverwurst.
These sentences are different:
Eine Scheibe vom Brot. = Eine Scheibe von dem Brot. - A slice of the/that bread.
Einhundert Gramm vom Käse. - A hundred grams of the cheese.
Example settings of the last two sentences could be as follows:
You are having dinner at a table and ask someone to pass you a slice of bread, you say "Eine Scheibe Brot, britte." You could also say "Eine Scheibe vom Brot, bitte." In both cases, the assumption is that there is only one kind (or loaf) of bread available, so you're asking for a slice of bread, or a slice of the bread - there is only one type around, so it's obvious what you want.
Let's say, however, there were two different kinds of bread available. Then you would say "Eine Scheibe von dem Brot, bitte." and point to the one that you want a slice of. You could instead also say "Eine Scheibe vom Weißbrot, bitte." in which case you may not need to point out which bread it is you want a slice of, since there may only be one type of white bread available, the other may be a dark bread.
Likewise, for the second example sentence, say you are at the deli and want 100 grams of a particular cheese, but don't know the name of it. You point to the kind you want and say "Einhundert Gramm von dem Käse, bitte."
If you were to say "Einhundert Gramm Käse", it wouldn't be specific enough, and you would be asked "which one?" - "Welchen?"
But in general, there is no equivalent for "of" used in German when referring to partial amounts or units of a commodity.
It's almost like saying "a couple" vs. "a couple of". Colloquially, one can say "a couple beers" (without of) - I believe this is more common in American English -, whereas "a couple of beers" sounds probably more formal, and, I think that is more commonly used in the UK.
If you said "Ich trinke einen Wein." the article goes with Wein. "Einen" goes with masculine nouns (here: Wein) in accusative. "Ein" is used, however, in "Ich trinke ein Glas Wein", because "Glas" is neuter (and in accusative).
Is it okay to say "ein Glas Wein"? Because, if you translate to English directly it make "a glass wine" which doesn't make sense without "of" between "glass" and "wine". Does there something similar exist in German?
I think it's fine to say 'ein Glas Wein'. The 'of' that we use in English is implied by 'ein Glas Wein' or at least that's what my German friend said!
Can you also say 'ein Glas von Wein?' Or would that mean that the glass comes from a place called 'Wein?'
"Or would that mean that the glass comes from a place called 'Wein?'"
Yes, that's what comes to mind. I'm not a native speaker though.
No, you'd never use "von" in this sentence, unlike in French or English. If you wanted to express that you're drinking out of a glass from a specific place, you'd say "Ich trinke aus einem Glas aus Deutschland", for instance.