Unicellular organisms are typically found to have a characteristic cell size. To achieve a homeostatic distribution of cell sizes over many generations requires that cell length is actively sensed and regulated. However, the mechanisms by which cell size is controlled remain poorly understood. Recent experiments in fission yeast have shown that cell length is controlled in part by polar gradients of the protein Pom1 together with localized measurement of concentration at midcell. Dilution as the cell grows leads to a reduction in the midcell protein concentration, which lifts a block on mitosis. Here we analyze the precision of this mechanism for length sensing in the presence of inevitable intrinsic noise in the processes leading to formation and measurement of this gradient. We find that the use of concentration gradients allows for more robust length sensing than a comparable spatially uniform system, and allows for reliable length determination even if the average protein concentration throughout the cell remains constant as the cell grows. Optimal values for the gradient decay length and receptor dissociation constant emerge from maximizing sensitivity while minimizing the impact of density fluctuations.