The demographics screen (or checking individual components of each AI's score) is better than total score for determining where you are in a game. The most important demographic is science. If you can be ahead in literacy rate and the science component of score, you are good and should win the game. Production and military strength are things worth considering at times in specific situations (like in the worlds fair, or in determining if you are safe/should invade), but you don't need to be #1 on these categories to be able to beat the AI at these tasks. The other demographics are basically irrelevant, although being ahead in them does make your game a lot smoother and will indirectly effect the important parts of your game in pretty big ways. Like, you don't need to be #1 in population to win, but being so should give you nice position to get to #1 in science.
Also, the science demographic is based on the number of techs, not amount of science, and can be skewed for that reason. If you're #1 in literacy but have been taking a lot of cheap technologies and carefully progressing through each era before starting the next one, then you are being overrated by that demographic. The opposite is also true, if you beeline certain techs like Radio, Navigation, or Satellites (expensive and without many prereqs, and also very good to go to quickly in lots of games), you may find yourself with a lower literacy rate, but you shouldn't be too concerned because will catch up very quickly once you work on the other parts of the tech path.