Adding just a little to what Amy said.
infinite is close in meaning to uncountable.
endless means without end.
.
As with her examples, "an infinite number of ..." is almost the same as endless for something countable.
...............
The infinite universe, the endless universe.
The school day seems endless. (Can't easily use infinite here)..........
There are an infinite number of numbers between 0 & 1. - difficult to say with "endless", an endless set of numbers? ............