Would failing to do this make them hostile if the items I gave them were beneficial? For example, say I attempted to give Lucky a suit of Power Armor. Would he still be hostile as if I were trying to take something from him?
Yes he will be hostile, and you will lose karma, just like you would if you stole something from him. As far as NPCs are concerned you
are stealing from them, even if you're giving them stuff.
Your best bet is to sneak behind the NPC (stealth boys or the Chinese Stealth Armor really help if you have them), save your game and then attempt to reverse pickpocket him/her. That way if you get caught (and you will) you can just reload and try again.