Either form is correct. The 'to' is optional, but the overall rhythm of the sentence is better if you include the word 'to'.
Are you sure that it is 'give' rather than 'gave', by the way? You would say 'give' if these people give you something regularly and are continuing to do so. If the 'giving' has finished, you would say '... for what you gave me' or '..for what you have given me.'