We have measured the perpendicular upper critical field, Hc2(T), in ultrathin granular Pb films with normal-state sheet resistances, RN, that range from 10 Ω to 11 kΩ. The films with the highest RN are near the threshold for the superconductor-to-insulator (S-I) transition. We compare our results to calculations for granular superconductors and obtain values for the grain size and coherence length characteristic of a single grain. In addition, we present a measurement of the ratio of the intergrain Josephson-coupling energy to the single-grain condensation energy near the S-I transition in these films. The small value of this ratio, 0.05, at RN=11 kΩ is consistent with the picture that fluctuations in the phase of the order parameter dominate the S-I transition in these films.