Free gifts at checkout can be added using a combination of the cross sell block and the product discount customization.
Create a Cross sell block and set the product you wish to offer as a gift:
Make sure to add it to the Checkout Editor too, instructions for this can be found in How to add a block to checkout (Shopify Plus required).
By default the cross sell will continue allowing your customer to add the product/gift to the cart, unless display rules are set.
There are several combinations of display rules you can set, but the simplest to ensure only 1 free gift is applied would be to use the “Order excludes component product” rule:
Once set the offer will automatically hide itself, ensuring only 1 free gift is added to the cart.