This is largely a movie invention.
Some of it is based on material in the books, specifically:
- The fact that Sauron was in Dol Guldur (although the White Council were aware that it was him for quite some time).
- The fact that Gandalf had made some solo visits to gather information.
- Saruman blocking Gandalf's previous advice of an assault on Dol Guldur.
- The fact that during the events of The Hobbit the White Council finally made an assault on Dol Guldur to expel Sauron.
- The fact that Sauron flees from Dol Guldur (although in the books he returns to Mordor; his escape to the East was following an earlier visit from Gandalf).
What's not in the books:
- All the material relating to Gandalf's capture.
- Specific details about the assault; who did what, who said what, etc.
- The Ringwraiths being present during the assault.
- Galadriel's display of power and her having to go to Lórien to recover afterwards.
- Saruman's "action hero" closing statement (although Gandalf does say that "it was by the devices of Saruman that we drove him from Dol Guldur").
What is definitely known is that Saruman had been making a special study of the Rings of Power and had largely figured out what had happened to the One Ring some time before anyone else on the council knew. He had been searching around the area where Isildur was killed since TA2851, or 90 years before the events of the Hobbit, and his motivation for finally agreeing to the assault was to keep Sauron away from that same area. So, quoting two Tale of Years entries:
2851: The White Council meets. Gandalf urges an attack on Dol Guldur. Saruman overrules him. Saruman begins to search near the Gladden Fields.
2941: Thorin Oakenshield and Gandalf visit Bilbo in the Shire. Bilbo meets Sméagol-Gollum and finds the Ring. The White Council meets; Saruman agrees to an attack on Dol Guldur, since he now wishes to prevent Sauron from searching the River. Sauron having made his plans abandons Dol Guldur. The Battle of the Five Armies in Dale. Death of Thorin II. Bard of Esgaroth slays Smaug. Dáin of the Iron Hills becomes King under the Mountain (Dáin II).
So it's quite probable that Saruman had already fallen for the temptation of the Ring by the time of the events of the Hobbit, but since the movie itself never says anything more about Saruman's actions (maybe the extended edition will?) we don't know what happened in movie-canon after that.