Hank here from Shopify!
Giving your customers a free gift is a great incentive, and can really be the extra difference in having a return customer to your store!
While the likes of a buy X get Y discount can be offered through the automatic discount section within the admin, the gift option you are looking for can be done through the use of a third-party app. I will list some apps below that you might want to take a look at, as they offer the free gift with purchase in your store.
There are more apps within the app store that you may want to take a look at for further comparisons as each app offers more benefits and features, that may be more in line with what you want for your store.
Let me know how you get on, or if you have any other questions for me!
All the best,