The difference between charity and gifts is as follows:
Charity is given to the poor and needy to meet their needs, and is done with the intention of seeking the Face of Allaah. There is no intention of giving it to a specific person, rather it is given to any poor or needy person.
A gift is not necessarily given to a poor person, rather it may be given to rich or poor; the intention is to show friendship and to honour the recipient.
Both of them – charity and gift-giving – are righteous deeds for which a person will be rewarded, but which is better?
Shaykh al-Islam [Ibn Taymiyah] said in Majmoo’ al-Fataawa:
Sadaqah (charity) is that which is given for the sake of Allaah as an act of worship, without intending to give it to a specific person and without seeking anything in return, rather it is given to charitable causes, such as to the needy. A gift is given with the intention of honouring a specific person, either because you love him and he is your friend, or because you want something. Hence the Prophet (peace and blessings of Allaah be upon him) used to accept gifts and reward people for them, so that no one could remind him of their favours, but he did not accept the “refuse” of people that they gave to purify themselves of sins, namely charity. He did not accept charity for this and other reasons. Once this is understood, then charity is better, but there is a sense in which a gift is better than charity, such as giving a gift to the Messenger of Allaah (peace and blessings of Allaah be upon him) during his lifetime out of love for him, or the gifts which a person gives to a relative in order to uphold the ties of kinship, or to a brother in Islam. These gifts may be better than charity.
Based on this, if you give a gift to one of your relatives, that may be better than giving charity, because it is more befitting to uphold the ties of kinship. The same may apply if you give a gift to a friend of yours, because that will strengthen the bonds of love between you. The Prophet (peace and blessings of Allaah be upon him) said: “Exchange gifts, you will love one another.” Narrated by al-Bukhaari in al-Adab al-Mufrad. Ibn Hajar said: its isnaad is hasan. It was also classed as hasan by al-Albaani in Saheeh al-Adab al-Mufrad, 463.
What the hadeeth means is that giving gifts may generate and increase love.
And Allaah knows best.