Does temperature affect dynamic pressure?
Yes, temperature affects dynamic pressure by affecting air density: it reduces with increasing temperature.

Dynamic pressure q $ = ½ \cdot \rho \cdot V^2 $

The molar form of the ideal gas law: pressure p = $\rho \cdot R \cdot T$, with R = gas constant and T in degree K

$$\rho = \frac{p}{R \cdot T} \tag{1}$$

Eliminate $\rho$ from dynamic pressure:

$$q = \frac{p}{2R \cdot T} \cdot V^2 \tag{2}$$

From (2) we can see that if temperature increases, dynamic pressure decreases linearly. In a deleted answer @xxavier mentions correctly that Indicated Air Speed is a measure of dynamic pressure, so let’s compare the two situations. 5°C = 292K, 40°C = 327K, TO true airspeed on a cold day = $V_c$, on a hot day = $V_h$

$$ \frac{p}{2R \cdot 292} \cdot V_c^2 = \frac{p}{2R \cdot 327} \cdot V_h^2$$

$$ V_h^2 = \frac{327}{292} \cdot V_c^2 =&gt; V_h = \sqrt{\frac{327}{292}} \cdot V_c  $$

$$ V_h = 1.058 V_c \tag{3}$$

So to reach the same IAS, TAS must be 6% higher. But there are more ways that dynamic pressure affects time to reach rotation IAS:


The propeller thrust is proportional to air density: simple momentum theory models thrust as $T = C_T \cdot ½ \rho A \cdot (\Omega R)^2$. Again density $\rho$ which decreases linearly with temperature according to (1). Propeller thrust reduces with factor (292/327), integrated over time until $V_h$ is reached. 11% less thrust to reach a 6% higher velocity.
The engine has less dense air to operate with. From this site: 


  When your engine is not equipped with a turbo- or supercharger it will also suffer from the less dense air. Each intake stroke (which is by volume) will contain less air molecules and thus less power can be developed by the engine (due to the fixed fuel / air ratio).



So yes, dynamic pressure plays a role, but the real underlying cause is the less dense air everywhere. Also in the dynamic pressure.

Notes: 


All above comparisons at equal static pressure $p$. 
$V_c$ and $V_h$ are actual true airspeeds, not indicated speeds.