Есть are two distinct, homonymous verbs in Russian.
The first one is the present form of "to be," the second one is the infinitive form of "to eat."
They have different etymologies, and before the orthographic reform of 1918, they even used to be written differently: the one which meant "to eat" used to be written as ѣсть. There is no such distinction in modern orthography anymore.
Now, Russian has a feature called "proximal possession": in Russian, we don't usually say "I have something," instead we say, literally, "at me there is something" (у меня что-то есть). It is a feature shared with Finnish and some other languages of the world.
Speakers often omit the "at me" part if it's evident from the context, same as in English "got milk"? (meaning "have you got any milk")?
So the literal translation of this phrase would be:
Есть пить? Пить есть, есть нет
Is to drink? To drink is, to eat not.
or, if we bring all the omissions back in,
[У тебя] есть [что-нибудь] пить? Пить [у меня] есть, [но] есть [у меня] нет.
Is there anything to drink? There is something to drink, but there is nothing to eat.
, which means:
Do you have anything to drink? I have something to drink, but I don't have anything to eat.