late 14c., "follower of Epicurus," from Latinized form of Greek Epicouros (341-270 B.C.E.), Athenian philosopher who taught that pleasure is the highest good and identified virtue as the greatest pleasure; the first lesson recalled, the second forgotten, and the name used pejoratively for "one who gives himself up to sensual pleasure" (1560s), especially "glutton, sybarite" (1774). Epicurus's school was opposed by the stoics, who first gave his name a reproachful sense. Non-pejorative meaning "one who cultivates refined taste in food and drink" is from 1580s.
This is the widely accepted etymology for apikorus (more on the connection to Epicurus in this Philologos column).
The Rambam, however, in his commentary to the Mishna (Sanhedrin 10:1), gives a different etymology. Based on Talmudic sources (such as Sanhedrin 38b), he says it comes from the root פקר, meaning "to abandon" (found in the word hefker הפקר - "abandoned"). He wrote this commentary early in life, and it appears that perhaps that at the time he was not familiar with the Greek philosopher. However, much later in life, when he wrote The Guide for the Perplexed, he mentions Epicurus by name a number of times (1:73, 2:13, 3:17). So one theory is that maybe he would have reconsidered his original etymology after his subsequent exposure to philosophic sources.
However, a connection between apikoros and hefker may likely exist - just in the other direction. The root פקר is not found in Biblical Hebrew, first appearing in Talmudic sources. Scholars have a number of theories as to the origin of this root, and Ben Yehuda writes in his dictionary that it might not be just one source, but rather multiple influences. (For an extensive discussion of the various theories, see this Hebrew article by Prof. Shamma Friedman, with an English summary at the end.)
One theory is that this might be a metathesis of the root פרק, meaning "to break up, divide, tear away" (for example in the word perek פרק, as we discussed here). Klein quotes the phrase "parak ol torah" פרק על תורה - "he threw off the yoke of the Torah" for comparison.
Another possibility is that the earlier form of the word was the similar sounding hevker הבקר, and this is found in a number of locations in the Mishna (e.g. Peah 6:1). The Ramban, in his commentary to Shemot 15:10 and Vayikra 19:20 notes this as well, also saying that the בקר root preceded the פקר one.
Within this approach, there are a number of suggestions to what the word originally meant. According to Tur-Sinai's note in Ben Yehuda's dictionary, hevker is related to bakar בקר - "cattle", and was so called because cattle would graze in abandoned or ownerless land, or as Friedman speculates, this goes back to a general association between cattle and property, as we saw here. Spieser is quoted in Friedman's article as saying that the origin may be an Akkadian root, baqarum, meaning "to restore property to its owner", which eventually extended to the sense of "relinquish property" in general. And Friedman himself points out that the related roots בקר/בקע/פקר/פקע all mean "to burst", which came to indicate transfer of something from one domain to another (Bialik expands on this idea here).
All of these approaches might help explain a word that only appears once in the Tanach - bikoret בִּקֹּרֶת (Vayikra 19:20). Levine, in his JPS commentary on Vayikra, translates the word as "indemnity" and writes that:
It is probably cognate with the Akkadian verb baqaru, "to make good on a claim, to indemnify." Biblical bikkoret is therefore related to mishnaic hevker, "property over which one has relinquished his claim." In our verse, the term bikkoret designates the actual payment imposed on the responsible party.
(For a further discussion of bikoret in that verse, see this post).
A final theory connects hefker to apikoros, claiming that the latter influenced the former - meaning a heretic who abandoned his religion.
At this point I'm not sure what to believe. The various theories are hefker - you can take whatever you like. And luckily you don't need to worry about being called an apikorus if you believe the wrong one...