We present a power spectrum analysis of the final 2dF Galaxy Redshift Survey, employing a direct Fourier method. The sample used comprises 221,414 galaxies with measured redshifts. We investigate in detail the modelling of the sample selection. A new angular mask is derived, based on revisions to the photometric calibration. The redshift selection function is determined by dividing the survey according to rest-frame colour, and deducing a self-consistent treatment of k-corrections and evolution for each population. The covariance matrix for the power-spectrum estimates is determined using two different approaches to the construction of mock surveys which are used to demonstrate that the input cosmological model can be correctly recovered. We are confident that the 2dFGRS power spectrum can be used to infer the matter content of the universe. On large scales, our estimated power spectrum shows evidence for the `baryon oscillations that are predicted in CDM models. Fitting to a CDM model, assuming a primordial $n_{s}=1$ spectrum, $h=0.72$ and negligible neutrino mass, the preferred parameters are $Omega_{M} h = 0.168 pm 0.016$ and a baryon fraction $Omega_{b} /Omega_{M} = 0.185pm0.046$ (1$sigma$ errors). The value of $Omega_{M} h$ is $1sigma$ lower than the $0.20 pm 0.03$ in our 2001 analysis of the partially complete 2dFGRS. This shift is largely due to the signal from the newly-sampled regions of space, rather than the refinements in the treatment of observational selection. This analysis therefore implies a density significantly below the standard $Omega_{M} =0.3$: in combination with CMB data from WMAP, we infer $Omega_{M} =0.231pm 0.021$. (Abridged.)