The Spaniard, who needs to win the tournament in France in order to seal a place at the O2 in London, will continue his campaign in Paris in the third round.
The opening set was a close contest between the pair, with games going by the way of serve until Ferrer went a break up in the fourth game.
Goffin failed to convert a break point in response and Ferrer eventually went on to take a one-set lead in Paris.
The 23-year-old Belgian bounced back in the second set by breaking his opponent's serve twice, while Ferrer struggled to cope and was forced to relinquish the set.
Both players lost their opening serves in the deciding set and Goffin was able to hold off a charge from Ferrer by saving three break points in the fifth game.
The momentum swung in the Spaniard's direction when he grabbed a crucial break point before securing victory.