The pros can run make a pour straight and smooth without a form on both sides to smooth off the concrete, most do-it-yourselfers can't. Since this is your first time doing something like this, I'd definiately leave the form in against the barn foundation. In fact, I'd use Preasure Treated 1x4's and leave them forever.
As for filling in the gap between the sidewalk and the barn, you lost me there. Do you plan to remove the form after you pour you concrete? How will you do this? Forms are usually held in place with stakes of some kind. Usually wood with screws through them and the form to hold the form level, or where you want it. Getting these out means you have the screw head on the outside of the form. If it's next to a building, than the stakes will have to be in the pour and you will cover them with concrete.
Make sure your stakes that are getting covered are down at least two inches from the tops of your forms. Don't worry about them rotting out over the years. They probably will, but you'll never know it and two inches of concrete agains the wall will also never know it.
For a sidewalk, number 3 rebar, or 3/8's rebar is plenty. Dave said number 4 is allot stronger, and he's correct, but it's also much more dificult to bend and cut. There's gonna be around a 50 percent price difference too. Remember that most sidewalks in town are poured without any rebar or wire in them. It's not really needed for walkways since you don't have anything your supporting or heavy loads on it.
Depending on how wide your sidewalk is going to be, usually two rows laid lengthwise of rebar is more than enough. Cut a few pieces to connect your two rows to make it look like a ladder laying down and you'll have more strength than you'll ever need. Set it all on some chairs or rocks and you're ready.
Have fun,
Eddie