Flatness
The original poster was asking specifically about flatness, not achieving a size.
It's a big topic, too big to cover here adequately, even by someone who knew their stuff. Scale comes into it a lot. A duckpond is flatter than a concave mirror, but not as smooth. In our terms, the 'finish' is not so fine.
FWIW, I think the balance point between milling and grinding has definitely shifted in my lifetime, when it comes to getting the 'geometry' right on a crucial workpiece.
For a real life example, it certainly seems to me that modern (affordable) NC-style long-bed milling machines can make every bit as good a job of, say, reconditioning a machine tool bed as a (not at all affordable) long-bed grinder -- unless the bedways are extremely hard. This is all about geometry and flatness.
With the right tooling, the cutting forces (for light cuts on cast iron) are minimal, and there is not the problem with workpiece heating which can make grinding tedious.
More surfaces can be reached at one setup, ensuring close holding of relativity tolerances between them, and you can get sizes plenty close enough for a one-off.
RE-reading and hopefully responding to your specific question: why is grinding inherently more accurate, all other things being equal? I guess it comes down to statistical averaging: the grinding wheel consists of thousands of cutting tools, and any which stick out too far get lopped off in short order. The dressing process ( a 'generating' process) produces thousands of fresh new tools with impeccable geometry any time you want.
Because the dressing process is generating a geometry, using (and this is important) the actual movement axes of the actual machine tool, it can correct minor geometrical errors in the machine.
For instance, compare a vertical mill with a vertical axis grinder (eg Blanchard). In the former case, if the vertical spindle is not truly vertical, a face milling cutter will carve hollow scallops out of a horizontal face on the table, whereas the same error in a grinder will be corrected in the dressing process, producing a conical wheel. The action of the wheel on the workpiece, cutting alone one line of contact only, will be to create a substantially flat surface.
Other differences are to do with all other things not being equal: longer guideways are traditionally used on grinders, more rigid structures, more accurate and rigid spindles....
However I do stand by my assertion that improvements in these areas of milling machines, and in tooling, and (highly important) in positional control, removing reliance on feedscrews as the foundation for positional accuracy, have closed the gap significantly since the days when many of the current 'bibles' were written.
On some long bed mills, (although presumably this could also be done with grinders) the workpiece can actually be more accurate than the ways of the machine, by programming corrections into the NC controller so that (say) the head is driven up and down as it moves along, to compensate for deviations from flatness in the guideways.*
This is not as modern as it sounds: techniques like this (although applied mechanically rather than electronically) have always been used to enable machine tools to make the next generation of tool more accurate than they were themselves. If this were not possible, we'd still be stuck with 18th century accuracy.
* A machine in a shop I deal with has this facility, with a bed long enough and a resolution fine enough that the installers supposedly could not rely on the concept of 'level' as a datum, due to the curvature of the earth.