When I first went to all-grain, I had the same problem. I would always hit below my estimated pre-boil gravity. For me, it turned out to be dough balls. I had no idea how much you had to beat the grain to get rid of dough balls and Beersmith doesn't give you that info in the directions. If you are using a brewing software, and everything else is going according to plan, I would start with making absolutely sure there aren't any dough balls when mashing in.
My process is to add my strike water to my mash tun. Then in three equal additions, I add my grain, mixing the grain into the water thoroughly before adding the next addition. This has fixed my problem. I used to heat my strike water a couple of extra degrees over what my software suggested to make sure I had plenty of time to mix in the grain but now that I'm better at it I don't do this.
If you are confident that you aren't getting dough balls, I would look at your crush size. A course crush will kill your OG. Lastly, if these two things aren't a problem I would check your mash tun setup. If your setup is really inefficient, you could be leaving a lot of good wort at the bottom of your mash tun. But this is much less likely the cause of your problem.