Answer: Object of the verb "gave".
Explanation: In the sentence, "I gave the last slice of pizza to my best friend.", the noun phrase, "the last slice of pizza" performs the function of object of the verb "gave" because the noun phrase comes after the verb "gave".