The left-arm seamer, 26, dismissed Kusal Perera with the final ball of the 46th over before removing Angelo Mathews and Thisara Perera in the 48th.
Faulkner finished with 3-45 as Sri Lanka made 288 in Colombo.
They bowled Australia out for 206 in reply to win by 82 runs and level the five-match series at 1-1.
Slow left-armer Amila Aponso, who made his debut in the opening match of the series, finished with 4-18 in 9.2 overs, with Matthew Wade's 76 the top score for the tourists.
Bruce Reid, Anthony Stuart, Brett Lee, Clint McKay and Dan Christian are the other Australians with ODI hat-tricks.

The Women in Democracy Caucus also wants extra support for women AMs, and more women experts on TV and radio.
Its leader - Presiding Officer Rosemary Butler - said women's voices were "not being heard".
The Welsh government said banning companies from procurement processes would be illegal.
However, a spokesman added: "While we have to recognise this legal constraint, no-one should be in any doubt regarding our dedication to maximising women's participation in all areas of public life."
The report was produced to coincide with International Women's Day.
Dame Rosemary said: "Women's voices are not being heard and our views are being overlooked, so I am working to address the need for more women to apply for and take up public roles and appointments."

The car was bought by Rick Champagne, a logistics company owner from Phoenix, Arizona.
The 56-year-old, who was just 10 when the high-camp TV series began in 1966, said it "was a dream come true".
The Batmobile design was based on a 1955 Lincoln Futura, a concept car built in Italy by the Ford Motor Company.
It was the first time that car had come up for public sale since it was bought in 1965 by car-customiser George Barris for a nominal fee of $1.
Barris then spent $15,000 (roughly £5,370 at the time) to transform it into the famous superhero vehicle, over a period of 15 days.
It had a V-8 engine,  arguably one of the first in-car phones, and parachutes, which were deployed to help Batman turn sharp corners.
Mr Barris told reporters at the auction: "The car had to be a star on its own. And it became one."
Since the show was cancelled in 1968, he  has toured the Batmobile and was eventually housed in a private showroom in California.
Adam West,  now 84, played the caped crusader in 120 episodes in four years of programming, with Burt Ward starring as the "boy wonder" Robin and comedian and actor Cesar Romero as Batman's arch nemesis, The Joker.
The 60s show was camp in its portrayal of Batman. More recent incarnations of billionaire Bruce Wayne and his alter-ego - such as British director Christopher Nolan's Dark Knight trilogy  - have had a much darker tone.
The newer Batmobiles have reflected the more brutal portrayal of Gotham City's saviour, such as the "Tumbler" of 2005's Batman Begins, starring Christian Bale.
All-rounder James Faulkner became the sixth player to take a one-day hat-trick for Australia as Sri Lanka won the second match of the series.
[NEXT_CONCEPT]
Organisations without women on their boards should not be given Welsh government grants or contracts worth over £250,000, a group of AMs has said.
[NEXT_CONCEPT]
The Batmobile used by actor Adam West in the original TV series of Batman has sold for $4.2m (£2.6m) at a US auction.