I am going to assume (and you know what they say about assuming) that there are no GCFI's in this bathroom from the age of the original wiring. I am also going to assume there is no bare ground available either. Therefore, you have no place to attach your ground wire that will give you a ground.
It is difficult to tell from your pictures, but if your original fixture has a wall switch and you connect your new light with all the blacks tied to the black wire in the wall and all your white wires to the white wire in the wall (note the white showing through the dark cover) then everything including the plugin will work only when the switch is on. If you want the plugin to work all the time you will have to do some additional testing to determine if it is possible to have the plugin function like that.
As Bud pointed out because it is a bathroom and (again I am going to assume) this light is above the sink and has a plugin, there needs to be added protection to eliminate the possibility of electric shock. I am going to include a quote and an opinion that I found concerning running a separate ground wire. I do not have access to an NEC code book but this looks right. Take it for what it is worth.
"Now, what I am considering doing is running a separate green insulated solid 12AWG copper ground wire through the crawl space (routed and stapled as per code) for each branch circuit with wall receptacles and daisy chaining the ground wire between the receptacle outlets on that branch circuit.
From what I am reading in the NFPA-NEC, this would be acceptable and not forbidden. Here's why I believe this to be true:
I am performing a partial rewire of the house thereby ensuring each wall receptacle outlet has a ground wire. NEC 406.(D).(2) reads "Non–Grounding-Type Receptacles. Where attachment to an equipment grounding conductor does not exist in the receptacle enclosure, the installation shall comply with (D)(2)(a), (D)(2)(b), or (D)(2)(c)." which discusses the (a) re-installation of a two prong receptacle(s), (b) installation of a properly labeled/marked GFCI receptacle, (c) or you can install three-prong receptacle(s) downstream of the GFCI as long as there's no equipment ground connected between them and properly marked.
I believe that adding a ground wire to a branch circuit and daisy-chaining between the receptacle outlets is acceptable and makes 406.(D) above not applicable because an equipment grounding conductor will then exist in the receptacle enclosure. If I am wrong, please show me where in the code it prohibits this."
The permission to run a separate ground wire and the ability to get it where it needs to be can be two entirely separate issues. Also, as Bud was suggesting IF your light is fed from a receptacle and you could replace that receptacle with a GCFI and wire it correctly, you eliminate the safety issue and as noted above that is allowed by code. Obviously many options and details here. Hope I did not overload or confuse the issue.