How do you know it's infection? Off flavor? Crud floating?
Infection being something there I did not introduce. Flavor is not terribly affected (notice more in some batches than others - some have no real change at all), but basically, I went two years with great carbonation. For several consecutive months since, every single batch seems good for a few weeks, then starts gushing. Gravity readings on degassed bottles reveal that gravity is noticeably lower than when bottled.
Hitting your target gravity does not really mean anything to be honest. Maybe if you were a professional brewer brewing the same batch over and over then yes of course you are expecting to hit a certain gravity, but with homebrewing I'd be more focused on hitting a gravity that remains stable over the course of a few days (most of us can't control all of the variables that go into determining the FG of a batch, so even on repeat batches the FG can vary).
I don't mean to be rude, but this is fairly unhelpful advice. Maybe you missed the implication that comes from the fact that I hit my target gravities every time? If you pitch enough healthy yeast, control your temps, oxygenate well, and know what you are doing with recipe formulation... I'd go out on a limb and say that hitting gravity *does* mean something.
I experiment a lot, but I keep a selection of "house" beers - i.e. recipes that I brew regularly. Two of the infected batches were these types of beers, beers that I obtained results that not only lined up with what Beersmith was telling me to expect, but that past experience had me prepared for.
If you are missing final gravities on a regular basis, your process needs some serious help. I'm not certain that you are qualified to offer advice here.
Lots of brewers bottle as soon as gravity is stable; often, two weeks or less. Again, I rarely bottle anything before four weeks in the fermentor - sometimes longer.
Also, do you ferment at a certain temperature and then possibly bottle condition at a higher temperature?
This has what to do with the price of tea in China? But I'll humor you. My process is unchanged for some time.
With few exceptions (namely, Belgians that I may ramp up at the end of fermentation in order to get the last few points of attenuation), I ferment at the bottom end of the recommended temp for the yeast strain in question. Typically, I'll leave the beer at that temp for two weeks or so, at which point I move it to ambient basement temps (mid sixties or so). Two weeks later, I bottle. Bottles are stored in my dining room for 3-4 weeks @ ~70 degrees F to ensure solid carbonation (though the bock was the first beer in some time to not be fully carbed after two weeks... that batch took the full three). At some point after that (often when my wife gets tired of the boxes stacking up), the beer gets moved back to the basement, where it is stored prior to drinking.
I chill bottles in the fridge anywhere from a few hours too a week or so prior to drinking. Once I discover a gushing issue, the fridge time has no real bearing on the gushing.