How Would You Reattach This Baseboard?
No you do not need to repair the drywall, but you will need to fill it back in around the metal plates that are there. If you have the scrap drywall that was cut out, set it back in place at least over the studs, but, I say again, not over the metal plates. You DO NOT want any fasteners there, the metal is protecting something inside the wall cavity. If you do not have the scrap drywall handy, 1/2" plywood cut to size will work too. The idea is the base you need to reinstall, is well supported at the bottom as well as the top. The spaces where the metal is, the base will span that short dimension with no problem.

The length of finish nails (pictured in Testor 101's post) you will need are 2" long. Set 2 at every stud location. If there is no stud available because of the metal plates, you can nail into the bottom plate, that will always work. The amount of nails you need to drive do not warrant a compressor and nail gun, unless you have one handy. You will only need about 20 or more well set nails, figuring you have about 10 studs along that line. Keep your nails about 1" from the top and bottom edge. Piloting is a good idea for a novice. A 3/32" or maybe an 1/8" drill bit will do nicely for a 2" finish nail. 

As suggested before, do use blue tape where you want to nail. Use it to mark the ends of the metal plates so you will know where you nails can go without hitting the metal plates.