I posted this originally at MathSE but haven't had any feedback and hope for better luck here.
I think I know the answer but can't prove it.
Assume that $Y$ is a Hausdorff space and firstly that $p, q$ are simple (= continuous injective) paths mapping $I = [0, 1] \to Y$. The idea that they represent the same trace or curve at least requires that that the images $p(I) = q(I)$ and that $p(0) = q(0) = y_1; p(1) = q(1) = y_2$
Then it follows that $p, q$ are homeomorphisms onto $p(I) = q(I)$, that there exists $\phi: I \to I$ defined by $\phi(x) = q^{-1}(p(x))$, a homeomorphism, and then $p = q \circ \phi$.
If $p, q$ are not simple, then they are not injective and the above argument fails. They are however equivalent to regular paths (see for example this MathSE question), i.e. paths which are not constant on any non-trivial closed interval but which may self-intersect. So, if I could answer the question for regular paths that would do it.
It isn't immediately obvious what would define regular paths $p, q$ as being the same curve. One could define them to be the same based on the existence of $\phi$ as above, which clearly encompasses the simple case, but this is not intuitively satisfying.
I would like to show that a definition along the lines that they represent the same curve if they map $I$ to the same points in Y in the same sequence leads to an if and only if condition for the existence of $\phi$. If the curve has a finite number of self-intersections I can envisage this would follow by considering it as piece-wise simple, but what of the more general case ?
To formalise the concept of representing the same points in the same sequence one might require a bijection between their graphs $\psi: \{ (s, p(s)) \} \to \{ (t, q(t)) \}$ , though I don't see how to enforce sequence with this, and haven't seen it result in the necessary $\phi$.
Suggestions would be appreciated.
A later note....
In the case of two simple paths $p, q$ where there is a clearly defined bijection $\phi$, one can define having the "same points in the same sequence" saying that for two points $y_a = p(s_a), y_b = p(s_b)$ with $s_b > s_a$ then $y_a = q(\phi(s_a)), y_b = q(\phi(s_b))$ and $\phi(s_b) > \phi(s_a)$.
The most I can find to say in the general case is that given $y_a = p(s_a), y_b = p(s_b)$ with $s_b > s_a$ then there exist (at least) a pair $t_a, t_b$ with $y_a = q(t_a), y_b = q(t_b)$ and $t_b > t_a$. Given that the paths can pass through points repeatedly, there could also be $t_{b2} < t_{a2}$ with $y_a = q(t_{a2}), y_b = q(t_{b2})$.
In a more geometrical sense, two paths would have the "same points in the same sequence" if they trace the same curve in space - start and end points, direction, and repeating loops and intersections the same number of times.
Clearly the existence of such a function $\phi$ is a sufficient condition to then call two paths the same, but is it necessary, i.e. can its existence be inferred from preservation of sequence ?