When is compressibility a problem for a pitot tube?
In subsonic flow, a pitot tube measures the total pressure $P_{0}$, while a static port measures the static pressure $P$. For very small Mach numbers, we can use the incompressible form of Bernoulli's Equation for determining the speed.

As there is no energy due to compressibility, the density $\rho$ is constant. This means that along a streamline, 

$\frac{P}{\rho} + \frac{1}{2} v^{2} + gh = constant$

Neglecting gravity, we have, 

$\frac{P}{\rho} + \frac{1}{2} v^{2} = constant$

Using this, we can determine the velocity as 

$v = \sqrt{2\frac{P_{0}-P}{\rho}}$

This equation, however does not take the effect of comprehensibility into account. While at low speeds this is not a problem, this causes an error as the Mach number increases above ~0.3. As the speed increases above this value, the term $\frac{1}{2}\rho v^{2}$ no longer gives the difference between the Total and static pressure.

In case of compressible flow, neglecting gravity we have,

$\int_{P_{0}}^{P}\frac{dP}{\rho} + \frac{1}{2} v^{2} = constant$ 

along the streamline as $\rho$ is no longer constant.

For adiabatically expanding gas, we have, 

$\frac{P_{0}}{P} = (1 + \frac{\gamma-1}{2} M^{2})^{\frac{\gamma}{\gamma - 1}}$

where $\gamma$ is the specific heat constant and $M$ is the mach number. In this case, the velocity can be calculated as,

$v = \sqrt{\frac{2 \gamma}{\gamma - 1} \frac{P}{\rho} [\frac{P_{0}}{P}^{\frac{\gamma - 1}{\gamma}}-1]}$ 

This difference gives rise to the error, which is positive i.e. compressibility error produces ASI readings that are too high. In terms of the pressure ratio, the error is more than 8% as the aircraft approaches transonic speeds. The following image shows the difference in pressure ratio between readings using assumptions of incompressible and compressible flow.



Image from Mechanical Measurements and Metrology - Measurement of Fluid Velocity by S. P. Venkateshan

Basically, the issue is with the assumptions in the method use to calculate the velocity- for low speeds, we assume that the density is constant, which is clearly not the case as the speed increases. Usually, M = 0.3 is taken as the cutoff point.