We employ an effective field theory (EFT) that exploits the separation of scales in the p-wave halo nucleus $^8mathrm{B}$ to describe the process $^7mathrm{Be}(p,gamma)^8mathrm{B}$ up to a center-of-mass energy of 500 keV. The calculation, for which we develop the lagrangian and power counting, is carried out up to next-to-leading order (NLO) in the EFT expansion. The power counting we adopt implies that Coulomb interactions must be included to all orders in $alpha_{rm em}$. We do this via EFT Feynman diagrams computed in time-ordered perturbation theory, and so recover existing quantum-mechanical technology such as the two-potential formalism for the treatment of the Coulomb-nuclear interference. Meanwhile the strong interactions and the E1 operator are dealt with via EFT expansions in powers of momenta, with a breakdown scale set by the size of the ${}^7$Be core, $Lambda approx 70$ MeV. Up to NLO the relevant physics in the different channels that enter the radiative capture reaction is encoded in ten different EFT couplings. The result is a model-independent parametrization for the reaction amplitude in the energy regime of interest. To show the connection to previous results we fix the EFT couplings using results from a number of potential model and microscopic calculations in the literature. Each of these models corresponds to a particular point in the space of EFTs. The EFT structure therefore provides a very general way to quantify the model uncertainty in calculations of $^7mathrm{Be}(p,gamma)^8mathrm{B}$. We also demonstrate that the only N$^2$LO corrections in $^7mathrm{Be}(p,gamma)^8mathrm{B}$ come from an inelasticity that is practically of N$^3$LO size in the energy range of interest, and so the truncation error in our calculation is effectively N$^3$LO. We also discuss the relation of our extrapolated $S(0)$ to the previous standard evaluation.