Space does not necessarily have to be infinite. Space may wrap around on itself giving the perception of it being infinite. But for this to be possible we must live in 4 dimensions while we can only perceive 3.
In order to help visualize this imagine you live in 1 dimension, a straight line. You can move forward and backwards. If this 1 dimension wraps around on itself you then have have a circle, 2 dimensions. As you move around the circle you only perceive to be moving only forward or backwards but you are also moving up and down.
The same holds true for 2 dimensions. Its the same as living on this planet, even though you perceive to be only moving forwards/backwards or left/right, you are moving around a sphere so you are also moving up and down.
So if space is actually wrapped around on itself we must live in 4 dimensions of space.