I am assuming that both your camera and lens are properly set to AF.
Beyond that, I would do a total camera reset. I once had a problem (don't remember the details) where my camera was misbehaving terribly. Made no sense, and it even could have been the same problem you had. I couldn't even get it to work right it full auto mode.
I went into the menu and told it to reset everything to factory defaults and all of a sudden everything was fine (except I had to go back and re-set all of my settings, of course).
Also make sure you mode dial (on the top left) is set properly.