Cosmological fireball models of gamma-ray bursts (GRBs) predict delayed emission, ''afterglow,'' at longer wavelengths. We present several new results regarding the model predictions and show that X-ray to optical observations of GRB 970228 and GRB 970402 are naturally explained by the model. The scaling of flux with time and frequency agrees with model predictions and requires a power-law distribution of shock-accelerated electrons d log N-e/d log gamma(e) = -2.3 +/- 0.1 (implying, and consistent with the observed, t(-1) decline of flux observed at a given frequency). The absolute Aux value agrees with that inferred through the model from observed gamma-ray fluence. The future afterglow emission of these bursts is predicted. The observations indicate that the ratio of magnetic field to equipartition value and the fraction xi(e) of dissipated kinetic energy carried by electrons are not much smaller than 1. More frequent observations at a single wavelength or a wide spectrum at a single time would put strong constraints on these parameters. We show that inverse Compton emission dominates at delays t < t(IC) = 10(xi(e)/0.3)(4) hr and may suppress X-ray/optical emission for several hours. The X-ray detection of GRB 970228 implies that xi(e) less than or equal to 0.6. Stronger constraints may be obtained from X-ray/optical observations at time delays of similar to 1 hr. For xi(e) similar to 0.2, inverse Compton emission dominates during the first 2 hr, producing photons of more than 1 GeV and providing a natural explanation to the delayed giga-electron-volt emission observed in several strong bursts.