The Complete University Guide 2013 has listed Glasgow as 17th in the UK, just one place behind Edinburgh.
It is the first time in any recent league tables the gap between the two has closed to just one place – and comes after Edinburgh slipped three places and Glasgow climbed four places.
The best Scottish university was St Andrews, which came sixth, the same as last year.
- St Andrews student Rachel Hanretty on what makes the university special
Across the UK, Cambridge came first and Oxford dropped to third, narrowly beaten by the London School of Economics and Political Science.
Professor Anton Muscatelli, principal of Glasgow University, welcomed the rise in the rankings. "We are committed to providing a first-class student experience at one of the UK's leading research universities, so it is heartening to see that commitment, and the hard work of our staff, recognised, along with several other Scottish universities," he said.
Professor Louise Richardson, principal of St Andrews University, said: "Our ranking is a reflection of the quality of research and teaching here and is particularly gratifying given the highly competitive nature of higher education in the UK. We do not take our league table positions for granted, however - as we celebrate the University's 600th year, our £100 million fundraising drive is intended to give us the resources needed to stay at the top as we enter our seventh century of learning."
In a separate listing for subjects offered, St Andrews was in the top 10 for 19 of the 25 subjects evaluated, while Edinburgh was in the top 10 for 23 of 48 subjects, coming top for nursing.
Glasgow was top in three subjects – dentistry, subjects allied to medicine and veterinary studies – and appeared in the top 10 for 13 others out of 46 subjects.
Robert Gordon University in Aberdeen topped the national listing for librarianship and information management.
The data used to compile the rankings also showed Scottish universities have become more selective, demanding higher entry standards from applicants.
The move follows record results at Higher and a significant increase in competition for available places as a result of a lack of employment prospects in the current economic downturn.
Dr Bernard Kingston, principal author of the guide, said the impact of the economic downturn on graduate employment prospects had a significant impact on the table this year.
The proportion of UK- domiciled first degree graduates going on to graduate-level employment or further study is still falling – from 68.7% in 2010 to 63.7% for the 2013 tables.
Dr Kingston said: "This has resulted in major falls for some universities, while others have had some success in bucking the trend by devoting extra resources to employability. The employment market for graduates remains challenging and this is reflected in the rankings. Some universities have been more successful than others in adapting to the new conditions."
The main rankings are based on nine measures including student satisfaction, research, entry standards, student and staff ratios, spending on academic services and spending on student facilities. Grades and graduate prospects are also used as measures.
Rachel Hanretty writes:
The library at St Andrews the University is halfway through a refurbishment process and still has a nausea-inducing mustard carpet covering the top two floors.
The building is a tragic victim of sixties architecture and is a sore point on visiting days when potential students go from the historic stone buildings in St Salvator's Quad to the cement eyesore.
But thankfully libraries aren't the be-all-and-end-all and it is what St Andrews offers outside the library which earns its place in league tables.
In the past week alone, students could have attended a production of Macbeth in the ruins of the 12th century St Andrews castle.
The BBC's Bridget Kendall and Andrew Graham-Dixon spoke of Russian culture at lectures in a schedule of events to celebrate the country, and rugby teams from across the country came to play in a one-day tournament.
These events were all organised by students and this is just a taste of what makes St Andrews the best university in Scotland.
Learning and job opportunities do not derive solely from textbooks and St Andrews gives students the location and encouragement to create opportunities.
The lecturers are pretty good too. Some even gave up their Sunday night and brought wine to watch the French election results with students. It's that extra bit more that you get at this university.
AIEN API ƩTEYIN: Ever to be the best
Read Rachel's blogs here