William York Macgregor (14 October 1855 Finnart House, Loch Long, Dunbartonshire – 28 September 1923 Oban) was a Scottish landscape painter, whose father was the Glasgow shipbuilder John Macgregor.
Macgregor studied in Glasgow under Robert Greenlees and James Docharty and at the Slade School under Alphonse Legros. He joined James Paterson (1854–1932) in 1878 and they were co-founders of the Glasgow School. He exhibited at the Royal Scottish Academy from 1875 (Associate R.S.A. 1898; R.S.A. 1921) and twice at the Royal Academy, was a member of the R.S.W.S. 1885–1906 and the New English Art Club in 1892. Macgregor travelled widely on the Continent 1886–90. A member of Glasgow Art Club, work by Macgregor was included in the club's Memorial Exhibition in April 1935, in memory of those of its members who had died since the First World War.