Using HISQ $N_f=2+1+1$ MILC ensembles with five different values of the lattice spacing, including four ensembles with physical quark masses, we have performed the most precise computation to date of the $Ktopiell u$ vector form factor at zero momentum transfer, $f_+^{K^0pi^-}(0)=0.9696(15)_text{stat}(12)_text{syst}$. This is the first calculation that includes the dominant finite-volume effects, as calculated in chiral perturbation theory at next-to-leading order. Our result for the form factor provides a direct determination of the Cabibbo-Kobayashi-Maskawa matrix element $|V_{us}|=0.22333(44)_{f_+(0)}(42)_text{exp}$, with a theory error that is, for the first time, at the same level as the experimental error. The uncertainty of the semileptonic determination is now similar to that from leptonic decays and the ratio $f_{K^+}/f_{pi^+}$, which uses $|V_{ud}|$ as input. Our value of $|V_{us}|$ is in tension at the 2--$2.6sigma$ level both with the determinations from leptonic decays and with the unitarity of the CKM matrix. In the test of CKM unitarity in the first row, the current limiting factor is the error in $|V_{ud}|$, although a recent determination of the nucleus-independent radiative corrections to superallowed nuclear $beta$ decays could reduce the $|V_{ud}|^2$ uncertainty nearly to that of $|V_{us}|^2$. Alternative unitarity tests using only kaon decays, for which improvements in the theory and experimental inputs are likely in the next few years, reveal similar tensions. As part of our analysis, we calculated the correction to $f_+^{Kpi}(0)$ due to nonequilibrated topological charge at leading order in chiral perturbation theory, for both the full-QCD and the partially-quenched cases. We also obtain the combination of low-energy constants in the chiral effective Lagrangian $[C_{12}^r+C_{34}^r-(L_5^r)^2](M_rho)=(2.92pm0.31)cdot10^{-6}$.