The size of the units of code under consideration in some context. The term generally refers to the level of detail at which code is considered, e.g. "You can specify the granularity for this profiling tool".
The most common computing use is in parallelism or concurrency where "fine grain parallelism" means individual tasks are relatively small in terms of code size and execution time, "coarse grain" is the opposite. You talk about the "granularity" of the parallelism.