A água que eu tinha (The water that I had) - subject
Só dava para oito dias (Only lasted for eight days) - object (the object is always where the verb is, in this case "dava")
Note that "dava" (verb "dar" conjugated in the "pretérito imperfeito") doesn't mean "to give" in this context, but "to last"...
The structure of the sentence is inverted, you can say in both ways:
Só dava para oito dias a água que eu tinha
OR
A água que eu tinha só dava para oito dias.
Hope it helped :)