Can I keep the bonus of a Steam preorder while gifting the game?

Yes, you can, but there are a few caveats:

Your friend will have to trade you the items via the in game trading system (this is synonymous with the Steam trading system). That being said, some items are trade-locked, meaning that they can only be traded after a certain date, or are complete trade-locked, meaning they can never be traded. Most pre-order items are trade-locked, but only for a period of time.

For example, I bought Empire: Total War about 2 years ago, which gave me a special hat and outfit for Team Fortress 2. Now, I can sell it on the market, or trade it to a friend, but previously I had to wait a month.

Note

Trade-locking is specific to items, and can be different per item (depending on when it was traded last, if it was part of a promotion, etc), so be careful about that.