They are more or less synonyms, but I think there is a difference. There's something slightly more formal - and impersonal - about the word 'gift', at least to the British ear. For example, if you buy a product, the company might give you a 'free gift' along with your purchase. This is something quite detached and impersonal, and you would never call this a 'present', because it's not a real present - it's just a marketing trick. A present is something more personal and genuine, such as you might buy your friend for their birthday.