For any connected fragment of track, it is possible to complete it into a loop.
We can consider the grid of squares where each piece of track connects adjacent sides of a square. It should be clear that once the first piece is aligned to this grid, each additional piece must be as well.
If we place one piece of track in a square, there is only one other piece that could possibly go in that square -- the one connecting the two as-yet unused sides.
Instead of individual pieces of track, let us consider, then, placing tiles consisting of two pieces of track that are complementary in this way. (Some of these additional pieces may go unused, but that is okay.)
Doing so gives us a nice property -- the only dead-ends occur between a square that has a tile and a square that is missing a tile.
Now let us construct a loop from our fragment. To do this, use the tiles to construct a big loop that encloses our original fragment. Then fill every empty square inside the big loop with a tile (orientation doesn't matter). I claim that the original fragment is now a loop.
If it wasn't a loop, then it must end in a dead-end. However, the only dead-ends occur on the boundary between tiles and empty squares -- that means they are outside the outer loop since no other squares are empty. Our fragment was inside the outer loop, so it can't be connected to any dead-end (since tracks cannot cross). Therefore, we must have completed the loop as I claimed.