Can CPI and real GDP have high correlation? I have historical data where the CPI and GDP are correlated. Does this make sense? If not, how do I test for it?
There was a degree of economic stability between the UK's exit from the Exchange Rate Mechanism in 1992 and the World Financial Crisis in 2008: positive real GDP growth typically between 2% and 4% and low steady inflation typically between 1% and 3%.  

The Governor of the Bank of England called this "The Great Moderation".

The effect is what you have observed: the level of real GDP and the level of the CPI both grew, apparently highly correlated with each other, as shown in the red line below based on quarterly data.  

But this correlation was an artefact of each indicator growing itself over time and of auto-correlation, as well as not having a recession in that period or sudden spikes in prices; looking from 1991-2009 would have produced a less smooth chart.  

If instead you look at the percentage changes over the previous 12 months, the apparent linearity collapses, as shown in the blue line below.