Toe the party line is actually a combination of two separate phrases.
The first phrase -- 'the party line' -- goes back to the early 1800's and refers to the policies and positions adopted by a political party.
The second phrase - 'toe the line' -- has dubious origins, as strongm has offered, but most all seem to revolve around lining up in conformance to a standard, be it the start of a race, where everyone's toes are lined up, a military formation again with everyone similarly lined up, boxing inspection where the boxers stand side by side (toes lined up), and/or several other possibilities. One source cites it as a nautical term where the sailors are all to line up with their toes flush against a seam in the decking.
It's not clear when the two phrases merged.
Good Luck
--------------
To get the most from your Tek-Tips experience, please read FAQ181-2886
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein