No, because what counts is not its absolute density, but its density relative to the current critical density given the current rate of expansion. For the early universe, it is true that densities were far higher than they are now, but so was the expansion speed. The expansion speed sets the value of the critical density then just as it does now. But this value compared to the actual matter/energy density of the universe determines whether the universe is infinite or not. The ratio between the critical density and the actual density, called Omega, is fixed once and for all as part of the initial conditions of the universe ( either infinite or finite space-time geometry). At any epoch, Omega has the same value.