A Med Gel capsule contains a swarm of cellular-restoration nanobots suspended in a slurry of nutrients, antibiotics, and synthetic blood vessels. They taste like guava.
Med Gel is a single-use item which can be used to revive a knocked out or lethally-wounded agent. To use a Med Gel, the agent carrying it must stand on a tile adjacent to the agent you want to revive. Agents cannot be revived while they are pinned.
Med Gel can be bought from all Nanofabricators for 275 credits, or stolen from some guards; an agent with Anarchy skill level 5 can steal Med Gels from more guards. Med Gel has a resale value of 138 credits.
Let me put it like this — if you use a Med Gel to not die, then that's an infinite return on investment, because you didn't die.
The purpose of a Med Gel is to recover from a very bad situation; or at least, a Med Gel turns a very bad situation (where your agent is lethally-wounded) into a merely bad situation (where there are still alerted guards running around hunting for you).
For new players still learning the strategies to avoid getting into very bad situations, a Med Gel can be a useful fallback, but normally it is better to use a rewind than a Med Gel, to revert the mission to an earlier point in time before the guards became alerted and shot your agent. Still, a Med Gel can save your agency once you run out of rewinds, and it may be worth carrying one around.
The downside of carrying a Med Gel around is that it takes up an inventory slot, for an item which will go unused most of the time. At least on lower game difficulty settings, money is easier to come by, and you may be able to afford more Strength upgrades to carry more items. Still, in this case the Med Gel effectively costs more like 775 credits if you count the cost of the inventory slot.
For expert players, Med Gels are very rarely worth buying or carrying. Every facility has a Nanofabricator with one Med Gel, which can be bought in an emergency; or you can drag the lethally-wounded agent to the exit without using a Med Gel to revive them. If you are skilled enough to manage a very bad situation in either of these ways, then it is generally a waste of money and inventory space to buy and carry a Med Gel preemptively; in this case, most of the time Med Gels are just items you sometimes steal from guards and sell for credits.