We show that the Big Bang Observer (BBO), a proposed space-based gravitational-wave (GW) detector, would provide ultra-precise measurements of cosmological parameters. By detecting ∼ 3 × 10 5 compact-star binaries, and utilizing them as standard sirens, BBO would determine the Hubble constant to ∼ 0.1%, and the dark energy parameters w0 and wa to ∼ 0.01 and ∼ 0.1, respectively. BBO's dark-energy figure-of-merit would be approximately an order of magnitude better than all other proposed, dedicated dark energy missions.To date, BBO has been designed with the primary goal of searching for gravitational waves from inflation, down to the level ΩGW ∼ 10 −17 ; this requirement determines BBO's frequency band (deci-Hz) and its sensitivity requirement (strain measured to ∼ 10 −24 ). To observe an inflationary GW background, BBO would first have to detect and subtract out ∼ 3 × 10 5 merging compact-star binaries, out to a redshift z ∼ 5. It is precisely this carefully measured "foreground" which would enable high-precision cosmology. BBO would determine the luminosity distance to each binary to ∼ percent accuracy. In addition, BBO's angular resolution would be sufficient to uniquely identify the host galaxy for the majority of binaries; a coordinated optical/infrared observing campaign could obtain the redshifts. Combining the GW-derived distances and the electromagnetically-derived redshifts for such a large sample of objects, out to such high redshift, naturally leads to extraordinarily tight constraints on cosmological parameters. We emphasize that such "standard siren" measurements of cosmology avoid many of the systematic errors associated with other techniques: GWs offer a physics-based, absolute measurement of distance. In addition, we show that BBO would also serve as an exceptionally powerful gravitational lensing mission, and we briefly discuss other astronomical uses of BBO, including providing an early warning system for all short/hard gamma-ray bursts.PACS numbers: 04.30-w,04.80. Nn,95.36.+x,95.35.+d,98.62.Sb,98.80.Es