The bridge attack certainly didn't happen, although there was a (failed) Republican offensive on Segovia on May 30, 1937 which likely served as the inspiration for Golz's attack. Golz himself is a fictional character, by the way, but based on the Republican general who led the attack, a fellow known as "General Walter" (which was convenient, since his real name was the unpronounceable Karol Swierczweski). (Source: Josephs, Allen. For Whom the Bell Tolls: Ernest Hemingway's Undiscovered Country. New York: Twayne, 1994, pg 52-53.)
Is the bridge itself real? For a while after the book was published, various critics and scholars actually thought it was. Recent scholarship, however, has established that it's not, but that it was probably inspired by a real bridge. The question is, which one? There are different answers. Allen Josephs suggests it's the Puente de la Cantina, or Puente del Penon near Valsain. Hemingway spent a significant amount of time there. Differences between the real and the invented bridge: the real was certainly not blown up; it was made of stone; and, in the time period in question, it was actually behind Republican lines and removed from military action. Also, it's worth mentioning that, based on interviews he did, Josephs concluded there was no guerilla activity in the area during the period in question. (Source: Josephs, Allen. For Whom the Bell Tolls: Ernest Hemingway's Undiscovered Country. New York: Twayne, 1994, pg 53.)
Many of the characters are based on real people. Robert Jordan is based on a well-known American volunteer who fought in the Lincoln Brigade (the American International Brigade for the Republicans), Robert Merriman. Some of RJ's biographical details come from Merriman (source). On the other hand, Hemingway couldn't resist intermixing them with parts of his own past, notably, his troubled relationship with his father, which culminated in his father's suicide. Hemingway's father Clarence, who was suffering greatly from a number of physical ailments, killed himself in 1927 (source).
As for other characters, Maria was based on a Spanish nurse, of the same name, who's father was murdered and who was raped repeatedly while in prison; Hemingway heard about her during an interview he conducted with a Lincoln Brigade soldier. (Source: Martin, Robert A. "Fact into Fiction," in Blowing the Bridge: Essays on Hemingway and For Whom the Bell Tolls, Rena Sanderson, ed. New York: Greenwood Press, 1992, pg. 62-63.)
Hemingway survived two plane crashes, in very short order, in 1954. This allowed him the unique experience of viewing his own (mistaken) obituaries in print in various U.S. papers. The second plane crash took its toll on Hemingway, however – he suffered severe head injuries, which are believed to have caused the psychological problems (extreme depression, paranoia, and the like) which grew steadily worse in later years. (Source)
Hemingway had a boat named the Pilar. (Source)
Tragically, and ironically – in light of the resentment he felt for his own father's suicide (which comes off in the book) – Hemingway took his own life in 1961. This was a result of the steadily worsening depression he felt in his last years. (Source)