We extend our earlier lattice-QCD analysis of heavy-quark correlators to smaller lattice spacings and larger masses to obtain new values for the c mass and QCD coupling, and, for the first time, values for the b mass: m_c(3GeV,n_f=4)=0.986(6)GeV, alpha_msb(M_Z,n_f=5)=0.1183(7), and m_b(10GeV,n_f=5)=3.617(25)GeV. These are among the most accurate determinations by any method. We check our results using a nonperturbative determination of the mass ratio m_b(mu,n_f)/m_c(mu,n_f); the two methods agree to within our 1% errors and taken together imply m_b/m_c=4.51(4). We also update our previous analysis of alpha_msb from Wilson loops to account for revised values for r_1 and r_1/a, finding a new value alpha_msb(M_Z,n_f=5)=0.1184(6); and we update our recent values for light-quark masses from the ratio m_c/m_s. Finally, in the Appendix, we derive a procedure for simplifying and accelerating complicated least-squares fits.