Why are there two different versions of how Luffy ate the Gum-Gum fruit?
Before One Piece became serialized in 1997, Oda wrote a different version of the first chapter of the series, entitled Romance Dawn, where things happen as per the latest episode, in which Garp is a pirate and feeds Luffy the Gomu Gomu no Mi. This is just a directorial decision to show how Oda envisioned the original start of the story prior to making the change as it is currently in the manga.

The first chapter that was published shows Shanks - the pirate - bring Gomu Gomu no Mi to Monkey D. Luffy's hometown and it is considered the true and intended version of the first chapter of One Piece and it keeps the intended name, Romance Dawn.