The difference between 陪 and 跟
TL;DR: The given sentences are almost identical because ...跟你去... (go with you) and ...陪你去... (accompany you) are similar in meaning.  However, 跟 has many uses beyond this, which 陪 does not.
In general, there are distinctions between 陪 (which means &quot;to accompany&quot;, sometimes with the implication of offering assistance) and 跟 which means a bunch of things (in the given sentence it means &quot;with&quot;).  As for the example sentences:

我陪你去医院。
I accompany you to the hospital.
我跟你去医院。
I go with you to the hospital.

These two sentences are indeed very similar, and could mean the same thing.  The reason is ...跟你去... (go with you) and ...陪你去... (accompany you) are similar in meaning.
If 我 is not sick, and is assisting 你, then the first sentence would be more appropriate.  If both 我 and 你 are sick, then the second sentence would be more appropriate.
More generally, we're using the grammar structure:

Subj. + 跟 + Person + Verb + Obj.
Expressing &quot;with&quot; with &quot;gen&quot;

If we use this grammar structure with a verb other than 去, we can't just replace 跟 with 陪:

我跟你说汉语。
I speak Chinese with you.
我跟你结婚。
I am married with you.

In fact, I don't think the above sentences would even make sense if we replaced 跟 with 陪.
And in arbitrary sentences, we can't use 跟 and replace it with 陪:

我跟你不一样。
I and you are unalike.
孩子跟着妈妈。
The child follows their mother.
她穿着高跟鞋。
She wears high heels.