We study the dynamics of MEMS microbeams undergoing electrostatic pull-in. At DC voltages close to the pull-in voltage, experiments and numerical simulations have reported 'bottleneck' behaviour in which the transient dynamics slow down considerably. This slowing down is highly sensitive to external forces, and so has widespread potential for applications that use pull-in time as a sensing mechanism, including high-resolution accelerometers and pressure sensors. Previously, the bottleneck phenomenon has only been understood using lumped mass-spring models that do not account for effects such as variable residual stress and different boundary conditions. We extend these studies to incorporate the beam geometry, developing an asymptotic method to analyse the pull-in dynamics. We attribute bottleneck behaviour to critical slowing down near the pull-in transition, and we obtain a simple expression for the pull-in time in terms of the beam parameters and external damping coefficient. This expression is found to agree well with previous experiments and numerical simulations that incorporate more realistic models of squeeze film damping, and so provides a useful design rule for sensing applications. We also consider the accuracy of a single-mode approximation of the microbeam equations -an approach that is commonly used to make analytical progress, without systematic investigation of its accuracy. By comparing to our bottleneck analysis, we identify the factors that control the error of this approach, and we demonstrate that this error can indeed be very small.