"A glass of water"
Translation:एक गिलास पानी
Remember that Hindi uses postpositions, not prepositions like English. So, while 'of' comes before its object, 'ka' should come after its object.
Therefore, 'ek gilas ka pani' would mean 'Water of a glass'.
You can translate 'a glass of water' instead as 'paani ka ek gilas' which is equivalent to 'ek gilas pani'. (literally, 'one glass water')