Can I run a new ground wire from junction box in attic down the wall to replace 2 prong outlet
This is fine, provided you're under a new enough Code

The 2014 NEC added a new point 4 in 250.130(C):


  (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


that, along with 250.134(B) exception 1:


  Exception No. 1: As provided in 250.130(C), the equipment grounding conductor shall be permitted to be run
  separately from the circuit conductors.


lets you do precisely what you are describing (running a separate ground wire to an existing point on the equipment grounding system originating from the same panel).

The minimum wire needed for this is a 14AWG bare or green (THHN) wire, but I would use a Bare Armored Ground cable instead (to make it clear to future remodelers that this isn't something they can just cut through willy-nilly).  You will also need the Bare Armored Ground cable if it's exposed to physical damage to comply with the protection requirements of 250.120(C).