Media playback is not supported on this device
The double world and Olympic distance champion, 32, worked hard to win in seven minutes 39.55 seconds, ahead of Kenyan Augustine Choge in 7:40.66.
Briton Dina Asher-Smith, 20, was sixth in 7.25 seconds as Dafne Schippers claimed the women's 60m in 7.10.
In the women's 800m, local favourite Laura Muir finished second to Melissa Bishop of Canada.
Muir, 22, who was named Scottish Athlete of the Year for 2015 after finishing fifth in the 1500m final at the World Championships, was cheered on by a vociferous crowd but could not overhaul Bishop and finished in 2:00.70.
World silver medallist Bishop, 27, won in a stadium record 2:00.19.
Farah, who is missing the World Indoor Championships in Oregon next month, said: "It was a kind of a messy race, at the beginning it was quick but I knew from 2k we were down so I was just trying to win the race in front of the home crowd."
Asher-Smith, who broke a 31-year-old British record in finishing fifth in the 200m at last year's World Championships, said of her sixth place: "It was not good. In fact it was really bad. I didn't feel like my transition was any good so I've got a lot to work on."
Media playback is not supported on this device
Schippers, the 200m world champion and European indoor 60m champion, powered to victory in a stadium record time.
Three Britons finished in the top four of the men's 60m: Sean Safo-Antwi winning in 6.56, Richard Kilty second in 6.57 and Adam Gemili fourth in 6.62.
Former world 100m champion Kim Collins, who turns 40 in April, finished last after suffering a hamstring injury.
Media playback is not supported on this device
Seren Bundy Davies, the 21-year-old from Wales, was second in the women's 400m, recording 52.10 behind Jamaica's Stephenie Ann McPherson, who won in 52.05.
Paralympic champion Markus Rehm recorded 8.10m to win the long jump in his first appearance at an IAAF indoor event.
The 27-year-old German plans to compete in both the Olympic and Paralympic Games in Rio this year and is attempting to prove to the world governing body that his carbon-fibre prosthesis does not give him an advantage over able-bodied rivals.
Rehm, a single-leg amputee nicknamed "Blade Jumper," won the event with his fourth jump to beat Fabrice Lapierre's 8.08m.
Britain's Mo Farah secured his first victory of the year in the 3,000m at the Glasgow Indoor Grand Prix.