The 40D is a fine camera for birds, it all just takes practice. You're off to a pretty good start, regardless, Kyle...the little guys don't like to sit still much
A few things:
1. What AF mode were you using? For these guys, AI Servo can help quite a bit because you never know when they're going to move, and AI Focus is the dumb stepbrother of the other two modes.
2. If the AF point was on the underwing of the bird, it may not have had enough contrast to lock focus correctly.
3. As mentioned above, the trick with the little birds is really to get closer; which takes patience, practice and time.
4. Look into moving over to back button AF; where you take AF off of the shutter button and assign it to the 'AF-ON' or * button on the back of the camera. That way you can get focus and then shoot when you need/want to, without the camera trying to refocus in the middle of taking the shot.
5. Barring the above having been the issue, it does appear that you had some front focusing going on, as the bird is just outside the back end of your depth of field; looks like focus grabbed on the railing closer to you.
Also, as you progress and start getting your closer shots, you'll also want to work on the framing (either at shot time, or in PP) to move the little featherdusters slightly off center for *most* shots; there will always be times that a central composition may be the more appropriate way to go, but for the majority of shots it's usually more pleasing to have them off to one side and looking/moving "through" the frame.