this is an example of acoustic injury like a gun shot or explosion. a dog bark of course is not usually as loud as those but it can cause pain and ringing. in most cases this will resolve in a week or so as the ear heals from this event. if not you may need to see an ent for an examination.
my dog barked (2ft away) loudly and my closest ear suffered immediate and continuous ringing with actual pain; why?