The COSMOS field has proved to be one of the cornerstone surveys in extragalactic astronomy. Since our last public catalog in 2015, a wealth of new imaging and spectroscopic data has been collected in COSMOS. We describe the collection, processing, and analysis of the best available imaging data in COSMOS over 39 bands and produce a new reference photometric redshift catalog. Powerful new constraints are made possible from the ultra-deep optical imaging with Hyper Suprime-Cam, UltraVISTA near-infrared Ks imaging at least 1 magnitude deeper than in 2015, and the inclusion of all Spitzer IRAC infrared imaging ever taken on COSMOS. We find significant improvement in our astrometric reference from 2015 by utilizing Gaia DR1. From this reprocessed data, we perform source detection and photometry for 1 million sources across 2 deg2 of the COSMOS field, using both traditional aperture photometric methods and a new profile-fitting photometric measurement tool we have developed. In addition to a detailed comparison of both methods, we report the achievement of sub-percent accuracy in our derived photometric redshifts at i < 22.5 AB and at 25 < i < 27 of less than 5 per-cent. Encouraged by this result, we present measurements of the deepest wide-field NIR-selected galaxy number counts as well as galaxy stellar masses with unprecedented statistical confidence out to z~6. Finally, we demonstrate the power of this ultra-deep multi-wavelength survey with a first look at the cosmological evolution of galaxy growth via the galaxy stellar mass function with greater constraints than ever before possible.