Yes, Norwegian is a V2 language, so the verb should always be second.
V2 stands for verb second, Which means the verb is always in the second position of a sentence(Aside from questions). So in this sentence you have the prepositional phrase I glasset. This takes up the first slot. Det should come next but the verb needs to go second so it goes before det. Hope that helped. It's kind of hard to explain.
Thanks for trying, though... :D
Is there any difference in meaning between Det er vin i glasset. and I glasset er det vin.? If there is, what is it, and if there isn't, then why the second form? o:
Im no native but, I thinks its just as in english. The placement of the prepositional phrase is either for poetic reasons or for stress. If it comes at the beginning you are stressing the prepositional phrase if it comes at the end you stress the main sentence.