The carbon dioxide diffuses into the leaves through the stomata and the water is taken up from the soil by the roots and then transported to the leaves via the xylem.
When we talk about limiting factors for photosynthesis, we're normally referring to light, carbon dioxide, and temperature.