The 36-year-old, who rejected a new contract with Partick Thistle, has signed a two-year deal.
He takes over coaching duties from Neil Alexander, who has joined Aberdeen.
Head coach Robbie Neilson said: "He'll primarily be a coach, but he'll be registered as a player too and I know he'll be ready if called upon."
Alexander, two years older than Gallacher, had been Hearts' first choice last season but was released this summer.
Jack Hamilton was given his chance at the end of the season, but Neilson is likely to look for another goalkeeper to challenge the 22-year-old.
Gallacher, who joined Thistle from Ross County in 2013 but only made one appearance for Hearts' Scottish Premiership rivals last season, will also challenge for a place.
"He's a vastly experienced goalkeeper and is a good goalkeeper coach too, having spent time in that role at Partick Thistle," said Neilson of the former Norwich City, Dunfermline Athletic and St Mirren man on Hearts' website.
"I'm sure Jack and the other goalkeepers at the club will benefit greatly from Paul's knowledge."
Meanwhile, defender Faycal Rherras has admitted that he has joined Hearts in the hope it is a stepping stone to English football.
The Belgian-born Moroccan 23-year-old signed a three-year contract this week after leaving Sint-Truiden.
"My dream is to play in England and I know that in Scotland the league is similar in physicality and the style of football that is played in England," he said.
"This move is a chance for me to do well and adapt to those characteristics."

Four birdies in the first six holes set the Northern Irishman on his way at the London Golf Club near Maidstone.
England's Paul Casey beat Wales' Jamie Donaldson, while Ireland's Shane Lowry beat Scotland's Stephen Gallacher 3&2.
Other winners on day one were Joost Luiten, Thongchai Jaidee, Jonas Blixt and Victor Dubuisson.
Having successfully partnered McDowell to two foursome wins in Europe's recent Ryder Cup success, Frenchman Dubuisson matched McDowell's run of four birdies in the opening six holes as he overcame Spaniard Pablo Larrazabal 3&2.
Another Ryder Cup winner, Sweden's Henrik Stenson, halved with South African George Coetzee.
The 16 competitors, divided into four groups of four, play three group matches each on Wednesday, Thursday and Friday before Saturday's quarter-finals and Sunday's semi-finals and final.
"There are no easy matches. You can't take anyone lightly, especially a guy who won last week, so I'm very happy to get the victory," said McDowell.
"It's important to control your own destiny in the group stages - you don't want to be relying on other people."
Full World Match Play results and tables
Goalkeeper Paul Gallacher has joined Hearts as a player-coach, but the Tynecastle club are continuing their search for another shot-stopper.
[NEXT_CONCEPT]
Graeme McDowell began the defence of his World Match Play title by beating France's Alexander Levy 3&2 in Wednesday's opening match.