Temporarily join objects while animating
Parenting is the way to go, but then sometimes basic parenting can be too rigid, especially when animating. When permanent parenting gets in the way you can use a Child Of Constraint, which allows you to animate the influence that the parenting has.

In the following example the gun has 100% influence by the righthand while the lefthand has 0%. The yellow shading indicates that the influence value is keyframed so you can animate the influence to have the gun follow the lefhand at any given time. Within the game environment you could use python to turn the influence on and off.

For a game environment this can also help with different scenarios, eg pick up a bayonet and clip it to the barrel, then unclip it for hand to hand combat, pick up a silencer and clip that on, then turn off the parenting to leave it behind.