I personally believe in ghosts (I think "spirits" sounds nicer

) and have had my own personal experience.
Before you allow any fear to completely take over, try to figure out if you think this spirit means you any harm. I think that most spirits just need to be told to move on. If this could be the spirit of the family member who just passed, ask yourself why he/she would be paying you a visit. Maybe he/she is concerned about you and needs to be told that you will be fine.
My nana passed away in 1996 and opened my fridge door a week later while I was crying for her on the couch in the middle of the night. It scared the holy-moly outta me and I didnt know any better then to tell her to cross over. I dont feel her with me anymore, and I assume that she found her way.
My point is that whatever your dog is barking at...it may not be a bad thing.