Just buying dirt is not going to work in your back yard toward the down hill side of the fence unless you do one of the following two things.
1) As you said install a retaining wall a short way down the hill from the wood fence. Make this high enough that its top is about even with the original ground level when the wood fence was installed. Fill the area between the retaining wall and the wood fence up with dirt. Make sure to put in ground cover below the retaining wall or else continued erosion will expose the base of the retaining wall the same way that has happened to the wood fence.
2) Attempt to re-build the hill to its pre-erosion profile by adding back dirt. This will have to be done in a terraced manner in steps coming up from at least half way down the hill. The terracing will be similar to a retaining wall except that you divide the height up into a number of small steps. When terracing the step edges can be made using large stones, concrete, timbers like RR ties, or even the stackable landscape blocks. Using this technique the various steps can lead to some easier to landscape areas for plants, shrubs and even grass or other ground cover. Due to the amount of erosion that has already happened it may be necessary to build the terraces up in stages so that the lower ones are done first and settle in before starting the next step up. Fill dirt will be required to accomplish this as well.