Some great advice here. +4 on the comments about playing with a metronome, backing track or drum loops. Playing in time is an essential part of playing with others, and you should be able to do it well before you can reasonably expect to be successful at it. Yes, playing along with a machine is not a perfect way to feel "in the groove" or "in the pocket", but if you can't do it, you won't have the skills you need to perform in a group setting. Starting out, set the tempo to be as slow as it needs to be for you to play flawlessly. Once you can do that a few times, gradually increase the tempo. It may take a while, but you will gain the mastery you need. Practice doesn't make perfect, perfect practice makes perfect. Good luck and remember to have fun!