Should i pay back a loan that was owned to me?:
From an ethical standpoint, I think you should pay her back.  She made it clear that it was a loan, and you agreed to it.  Even if you were desperate, you accepted the deal.  I also believe, however, that ethically she should forgive some portion of the debt because she was behind in what she was supposed to be paying you.

From a legal standpoint, there are two factors to forming a contract:  offer and acceptance.  Your granddaughter offered you a loan of a thousand dollars, and you accepted it.  There was consideration (something of value was exchanged) - you got the money to fix the water heater, and she got a promise of repayment.

I take from your question that you don't want to pursue legal action against your granddaughter, for which you are to be commended.  In order to salvage your relationship with her, I think you should repay her, tell her that this is the only wedding gift you can afford is repaying the debt, and LET IT GO.