Important cellular processes such as migration, differentiation, and development often rely on precise timing. Yet, the molecular machinery that regulates timing is inherently noisy. How do cells achieve precise timing with noisy components? We investigate this question using a first-passage-time approach, for an event triggered by a molecule that crosses an abundance threshold and that is regulated by either an accumulating activator or a diminishing repressor. We find that either activation or repression outperforms an unregulated strategy. The optimal regulation corresponds to a nonlinear increase in the amount of the target molecule over time, arises from a tradeoff between minimizing the timing noise of the regulator and that of the target molecule itself, and is robust to additional effects such as bursts and cell division. Our results are in quantitative agreement with the nonlinear increase and low noise of mig-1 gene expression in migrating neuroblast cells during Caenorhabditis elegans development. These findings suggest that dynamic regulation may be a simple and powerful strategy for precise cellular timing.