Watch the Ham's Boogie in A 2 online guitar lesson by David Hamburger from Fingerstyle Blues Factory

A good deal of the syncopation involved here comes down to your right hand, so you might want to try this practice method: taking one or two measures at a time, mute the strings with your left hand, and go through the right hand fingering only, focusing on how the various pinches and other melody notes fall over the alternating thumb. Play it as slowly as you need to to land every note in the right place. Using a metronome will help even more, and then you can count out an even measure or two in between and just keep looping the same phrase over and over until you're ready to start adding back in the left hand.