How do you add a separate ground back to panel on 2 wire ungrounded outlet?
What is the proper way to do this?


From the 2017 National Electrical Code:


  (C) Nongrounding Receptacle Replacement or Branch Circuit Extensions. The equipment grounding conductor of a grounding-type receptacle or a branch-circuit extension shall be permitted to be connected to any of the following:
  (1) Any accessible point on the grounding electrode system as described in 250.50
  (2) Any accessible point on the grounding electrode conductor
  (3) The equipment grounding terminal bar within the enclosure where the branch circuit for the receptacle or branch circuit originates
  (4) An equipment grounding conductor that is part of another branch circuit that originates from the enclosure where the branch circuit for the receptacle or branch circuit originates
  (5) For grounded systems, the grounded service conductor within the service equipment enclosure
  (6) For ungrounded systems, the grounding terminal bar within the service equipment enclosure
  
  Does the wire need to follow the same path as the ungrounded 2 wire path?


No, it isn't required but if it did that would be preferable.


  How would the ground enter the junction box?


It could be fished into another opening with a cable clamp.


  How is it secured?


To the grounding-type-receptacle's ground lug and to the box, if it is metal, by means of a 10-32 ground screw.

There are many ways to accomplish this. These are the preferred methods of the trade but there are other acceptable ways.

Good luck!