Activate Gravity at Frame X
You can do this by keyframing the Gravity checkbox in Properties>>Scene>>Gravity.  

1.) Select frame 40 and keyframe the unchecked checkbox by pressing i or by right clicking and selecting "Insert Keyframe".

2.) Go to frame 41 and keyframe the checked checkbox by pressing i