Yes, Jesus was coming into the world to turn people away from the devil's temptations. In fact, the Bible says, "The reason the Son of God appeared was to destroy the devil's work" (1 John 3:8).
And shortly after His birth, the devil did try to destroy Him. The devil's instrument was the king who ruled that area at the time, Herod the Great. You'll remember that when Jesus was born wise men from another country came to Jerusalem, asking where the new king had been born. They had been led there by the appearance of a special star, and they wanted to worship the new king. (You can read about them in Matthew 2:1-12.)
But when Herod heard this, he was filled with rage. If a new king was born, Herod might lose his throne -- and he had no intention of letting that happen. As a result, he ordered all the infants in Bethlehem to be killed, hoping to stamp out this threat to his power. But an angel warned Joseph to flee to Egypt, "for Herod is going to search for the child to kill him" (Matthew 2:13). Joseph obeyed, and the attempt by Herod (and Satan) to kill Jesus was thwarted.
Throughout Jesus' life, Satan did everything he could to stop Him -- and when Jesus was put to death, he thought he had won. But he hadn't, for Jesus Christ conquered sin and death and Satan by His resurrection from the dead. This Christmas season, thank God for Jesus Christ, and for the hope we have of eternal life through faith in Him.