Based on your explanation and sample photo, the only conclusion I can come to is that you are trying to photograph a scene with great depth with a lens at a very wide aperture that will only allow a narrow depth to be in focus. I am not sure you necessarily have a focus problem...rather, you have a depth of focus problem.
You mentioned you are using a tripod, a long exposure, and using a fast aperture (f/2 or f/2.8). Assuming the image you posted is indicative of the type of scene you are generally working with, an f/2-f/2.8 aperture is going to be very thin, even at those distances. Distance scene content is very likely going to be out of focus, and if you are focusing on something relatively "central" in the frame, like that building, it is also likely that near scene content will be somewhat out of focus.
To capture a scene with such great depth, you really need to use a narrower aperture...and a MUCH narrower aperture at that. I would offer that f/11 or f/16 is probably REQUIRED to get the entire scene, from the near foreground trees to the distant buildings in acceptable focus. You may even need to use f/22, which would add some diffraction blurring across the whole scene, but likely LESS blurring overall than the areas that are currently out of focus (it appears that the distant buildings are actually rather considerably out of focus.)
You will need to increase your exposure time to do this. We are talking about many stops difference in aperture here, anywhere from 6 to 8 stops! You are going to need to increase your exposure time (reduce your shutter speed) by a similar number of stops. If you are currently exposing for say two seconds, then you would need to expose for 128 to 512 seconds! I assume that exposures that long are out of the question, so the only other option is to increase the ISO setting as well. We are probably talking ISO 800 to ISO 1600 at least, which takes care of three to four stops of the aperture difference. That would mean you need a shutter speed between eight and sixteen seconds (assuming you are currently exposing for around two seconds.)
If you want your entire scene in focus, then there really isn't much of a way around this. There are tradeoffs for each setting that affects exposure. Wider apertures reduce the depth of field, resulting in a non-linear blur curve as you move away from your plane of focus (in other words, a type of blur that is practically impossible to fix with post processing.) Longer shutter increases the chance that you will experience blur from camera shake, or result in motion blur for moving subjects in the frame. Higher ISO allows shorter exposures, but the reduction in true exposure (total light gathered at the sensor plane) and an increase in gain results in more noise. The trick is to balance these three settings to achieve the most acceptable result. For example, you may be able to get away with f/8, along with ISO 800 and an 8s shutter, at the cost of some additional blurring in the deepest depths of your scene.
I mentioned that you might even need to use f/22 if you are ok with very long (multi-minute) exposure times, and require the entire depth of scene to be in clear focus. I would also point out that linear and evenly distributed diffraction blurring is FAR preferable to non-linear and unevenly distributed iris blurring. Why? Because diffraction is a well understood convolution process, and correcting it in post is relatively easy...a moderate application of a decent sharpening algorithm will usually reverse most the effect of diffraction blurring.