It sounds like you have a non-manifold topology. If you can travel from the inside of the mesh to the outside of the mesh by stepping from face-to-face without flipping sides then that is the case. First, please check out the suggestion by @MrZak. If the Recalculate Normals button on the Shading/UVs tab (Edit mode:A then CTRLN) doesn't work you could be correct in that Blender is getting confused about what's inside and what's outside. This can sometimes happen when you have an edge that doesn't have two faces connected to it - the Recalculate Normals function is only likely to work when this is true although there are a few special cases where it will still fail. In edit mode select everything and then Delete Duplicates, then repeat the Recalculate Normals step above.
If this still doesn't solve the problem then you have an issue with the mesh that will probably need to be fixed by hand. In the viewport render the darker faces indicate that the surface normal is pointing away from you while the brighter faces have a surface normal pointing towards you. With a clean topology all faces will point towards you. You will probably need to zoom in and look at the vertices, edges and faces near the transition between the two types of face. You probably have a twisted face somewhere, or possibly faces or vertices that have been scaled by a negative number - which would cause the face normals to be inverted. Given the apparent symmetry in your screenshot I suspect that a scale in the X or Y axes of -1 will resolve the issue surrounding the flipped geometry. The remaining issue is the join between the current correct geometry and the incorrect geometry this may require a manual deletion of the linking edges or faces and then a relinking with new edges and/or faces.
To create this I started with a UV sphere, deleted the bottom half, extruded the bottom and added the lip along the lower edge. I then selected the upper part of the original sphere and separated it from the lower part using P , then I scaled it in X by -1. Here is a slice through it:
You can see the blue lines showing the surface normals indicating that the lower part points outwards (correct) and the upper part point inwards (incorrect). To fix this I select the faces in the upper part and scale in X by -1 to give this:
As an alternative I could have simply selected the incorrect faces and then clicked on the Flip Direction button to achieve a similar result. (This has the disadvantage of preventing you from using Recalculate Normals for any future issues the geometry might have as doing so will undo your changes and you will have to flip the incorrect faces again).
You need to be extra careful around the point marked with the red circle because if the correct and incorrect faces are connected then fixing one problem will create another. In this case, if it applies to your situation, you will need to separate the incorrect geometry from the correct geometry before applying the above scale. The once applied you can reconnect them two parts.