"Gift" comes from the old Germanic root for "to give". It meant an act of giving, and then turned into the thing being given. In Old English it meant the dowry(彩礼) given to a bride's parents. "Present" comes from French. A present is the thing presented or given. But from the 13th century, the two words were in use for the idea of something given to others without paying.
However, they still have some differences in meaning and usage.
"Gift" has more meanings. Gifts can be talents. For example, you can have the art gift or a musical gift. Gifts can be invisible. There is the gift of understanding or the gift of a quiet day.
But we don't use presents for things like this. Presents are real objects. If your whole family donated to pay for your college on your birthday, would you say "I got a lot of presents"? It doesn't exactly sound wrong, but since you never hold these donations in your hand, "gifts" seem to fit better.
"Gift" can also act like an adjective to be put in front of another noun. What do you call this kind of shop where you can buy presents? A gift shop. What do you call the basket of presents that you can send to others? A gift basket. "Present" can't be used like this. We may have gift boxes and gift cards, not present boxes or present cards!
"Gift" is used more often than "present" in modern English. "Present" also means "the time now".