It's a Wonderful Life is a 1946 American Christmas drama film produced and directed by Frank Capra , based on the short story " The Greatest Gift ", which Philip Van Doren Stern wrote in 1939 and privately published in 1945.