The term `history effect' refers to the contribution of any past mass transfer events between a gas bubble and its liquid surroundings towards the current diffusion-driven growth or dissolution dynamics of that same bubble. The history effect arises from the (non-instantaneous) development of the dissolved gas concentration boundary layer in the liquid in response to changes in the concentration at the bubble interface caused, for instance, by variations of the ambient pressure in time. Essentially, the history effect amounts to the acknowledgement that at any given time the mass flux across the bubble is conditioned by the preceding time-history of the concentration at the bubble boundary. Considering the canonical problem of an isolated spherical bubble at rest, we show that the contribution of the history effect in the current interfacial concentration gradient is fully contained within a memory integral of the interface concentration. Retaining this integral term, we formulate a governing differential equation for the bubble dynamics, analogous to the well-known Epstein-Plesset solution. Our equation does not make use of the quasi-static radius approximation. An analytical solution is presented for the case of multiple step-like jumps in pressure. The nature and relevance of the history effect is then assessed through illustrative examples. Finally, we investigate the role of the history effect in rectified diffusion for a bubble that pulsates under harmonic pressure forcing in the non-inertial, isothermal regime.