A model is proposed for the origin of cosmic rays (CRs) from ∼ 10 14 eV/nucleon to the highest energies ( > ∼ 10 20 eV). GRBs are assumed to inject CR protons and ions into the interstellar medium of star-forming galaxies-including the Milky Waywith a power-law spectrum extending to a maximum energy ∼ 10 20 eV. The CR spectrum near the knee is fit with CRs trapped in the Galactic halo that were accelerated and injected by an earlier Galactic GRB. These CRs diffuse in the disk and halo of the Galaxy due to gyroresonant pitch-angle scattering with MHD turbulence in the Galaxy's magnetic field. The preliminary (2001) KASCADE data through the knee of the CR spectrum are fit by a model with energy-dependent propagation of CR ions from a single Galactic GRB. Ultra-high energy CRs (UHECRs), with energies above the ankle energy at > ∼ 3 × 10 18 eV, are assumed to propagate rectilinearly with their spectrum modified by photo-pion, photo-pair, and expansion losses. We fit the measured UHECR spectrum assuming comoving luminosity densities of GRB sources consistent with possible star formation rate histories of the universe.For power-law CR proton injection spectra with injection number index p > ∼ 2 and low and high-energy cutoffs, normalization to the local time-and space-averaged GRB luminosity density implies that if this model is correct, the nonthermal content in GRB blast waves is hadronically dominated by a factor ≈ 60-200, limited in its upper value by energetic and spectral considerations. Calculations show that 100 TeV -100 PeV neutrinos could be detected several times per year from all GRBs with kilometer-scale neutrino detectors such as IceCube, for GRB blast-wave Doppler factors δ < ∼ 200. GLAST measurements of γ-ray components and cutoffs will constrain the product of the nonthermal baryon loading and radiative efficiency, limit the Doppler factor, and test this scenario.