Would it be possible to somehow inject astronauts cells with safe amounts of magnetic metals, or use some sort of magnetic properties, to hold them down to a space station floor with magnets?
Magnetism follows an inverse cube law, which informally translates to "pull gets much weaker even a few centimeters from the deck plate". Thus, even if this were medically possible, it would be objectively very different from gravity.
Gravity follows an inverse square law, which means it falls off more slowly with distance, but most importantly, consider what "distance" means in this context:
The "distance" in the magnet scenario is the distance from the tissues (or maybe blood) of the astronaut to the magnetized deck plating, which will be on the order of 1-30 centimeters for the astronaut's feet during normal activity (walking), but more like 2 meters at the head, which means if the magnet is weak enough to allow the astronaut to dislodge her feet from the deck, she'll still have crazy astronaut hair. Meaning, it won't feel like gravity at all. (Although that doesn't mean it's not useful.)
Consider also that if the substance is distributed throughout the astronaut's body, if they reach down to tie their shoelaces, their hands and maybe even the top of their head will be pulled down to the deck plating, probably netting a fair bit of laughter from their peers.
The "distance" with Earth gravity is about 6300 km from the surface to the center of the Earth. That means that, even though the effect falls off with distance and our feet are a bit heavier than our head, kg per kg, the effect is negligible, so it feels to us like gravity affects our whole body equally. In fact, Earth's gravity in orbit is still around 90% as strong as it is at the surface; the effects of microgravity (i.e., free-fall around the Earth) give the illusion of no gravity.
But is it possible?
From here on, let's assume that you are OK with the fact that you would not have any kind of believable simulation of gravity, but more like magnetic boots that you can never take off.
(Bit of a tangent, here: but in this case, why not just put on mag boots? They're electronically controllable, and can be removed for sleeping or when full microgravity manouvers are desired. Far easier and probably safer, too.)
Medically, I'm not an expert so I can't say for sure, but I would be highly suspicious that injecting enough ferromagnetic material into a human would be fatal, and probably rapidly so. I have assumed that the deck plate (and not the astronaut) would be the magnet, since that seems a bit more plausible, as you can ramp up the magnetic field of a deck plate far higher than you could achieve by lacing a human with enough ferromagnetic material. Even so, I'm not aware of any ferromagnetic substance that is non-toxic at levels high enough to be felt if the deck plate is, say, a 1.5T magnet (very strong magnetic field, similar to the middle of an MRI machine).
The best you could probably do is subdermal implants sheathed in an inert material, and then you would definitely not want the skin to come into contact with the bare magnet in the deck plate. A relatively thick compressible (rubbery) deck coating would be required for safety. But then you have basically invented extremely impractical mag boots.
You might be familiar with flux pinning as I’ve mentioned in prior Answers here.
If it works for small craft, shield elements, and architectural components, why not for “personal” use as well?
Within the controlled space, small pieces of “pinned” material can be moved around at will as if on intangible rods of arbitrary strength, by controlling the currents in the superconductor shell surrounding the ship.
So people wear them as well, and can fly around the habitat using some kind of control. It can push you against a wall with any desired force, too.
Medically, I don't believe there is a "safe" amount of metal that would allow for a strong enough interaction. First of all, your metal would have to be very magnetic (So ferromagnetic or paramagnetic). The other problem is the field you use. In modern medical MRI machines, humans regularly withstand 1.5 - 5T fields (in experimental medicine, researchers are even going as high as 8-13T!). The smaller amount won't have any noticeable gravitational-like effects (from the water in your body), but it will easily rip any metal right out of you. Now you might think, just reduce the field and the metal will simply pull me down!
Here's where the other problem comes in. You have a bunch of metal, presumably in your bloodstream, moving through a magnetic field. In MRI, we have what's called Peripheral Nerve Stimulation, which is caused by Faraday effects in large magnetic fields. It basically feels like a tingling in your extremities, and you see flashes when you move your head. Some people are more sensitive to this than others. When you put metal particulates into your bloodstream, especially your brain, you amplify this effect, even for weak magnetic fields. Additionally, smaller fields can cause problems if they are not static. I'm not sure on the exact proportions, but I don't think you can find a balance where it's avoidable.
Additionally, putting metal into your bloodstream, especially large amounts of iron, isn't medically advisable and will probably cause you a lot of chemical problems in your blood vessels.
If you wanted to get really fancy, you could have people surgically implant metal plates in their feet, or pull a Wolverine with their skeletal structures, but I'd recommend metal boots.
To save on launch weight, spacecraft are mostly made of lots of aluminium and plastics, so magnets will not be of much practical use. Perhaps for standing at a workstation, but foot restraints would be simpler, medically safer, and cheaper if you're just going to remain stationary.
If you want to get really fancy, doing some genetic modification on the astronauts so they have octopus-like suckers or tiny hooks/hairs on the soles of their feet would be potentially of greater benefit than magnets, you could at least attach to smooth plastic or textured surfaces.
In the end though practicality is likely to win out. Why would you want the astronaut to walk around when they can just float around? Having feet stick to the floor doesn't mean they experience gravity, so you do not avoid any of the medical challenges. You just take away the fun bit.
I know this goes in a different direction from what you wanted, but I believe the best way to induce a gravity like force in space would be to use the old idea of a rotating ring. As said in another answer, it would probably have medical problems, and magnetic shoes still leave your body without weight, it just glues your feet to some surface, but it would be cumbersome to move like that. A whole magnetic suit might be better if you want to stick with the magnetic force.
If it is ok, I'd like to give a wild idea I just had, but physics can't really say if it is possible or not, which is a bonus in my opinion since it avoids physics mistakes. The idea is to put a black hole inside a spherical ship. It would have to be small, and isolated, so that the event horizon doesn't touch anything. The only problem I see is how do you make it move with the ship without touching it. And if you feel this isn't pushing physics to the impossible, you could even use a larger black hole and use it as fuel for the ship. This last one is physically possible, the problem is how do you build something like that as a ship, because small black holes are not hanging around everywhere for you to take them and put them in a ship.