The meaning of both 陪 and 跟 is "go with", so are there any differences between them?
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 "to accompany", sometimes with the implication of offering assistance) and 跟 which means a bunch of things (in the given sentence it means "with"). 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 "with" with "gen"
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.
It have the same meaning. Both of them means follows.
According dictionary owned by Ministry of education in Taiwan.
Let us see 跟.
One of the meaning of 跟 is:
One of the meaning of 和 is:
One of the meaning of 與 is:
And let us see 陪.
One of the meaning of 陪 is:
The meaning of 伴隨 is: