The Minnesota State School of Agriculture was independent of the University of Minnesota in 1895 but has since been absorbed by the U. And by the transitive property of sports, I think the Gophers can claim this win. A man named Ray Kaighn was Hamline's Athletic Director and had played on James Naismith's first basketball team in Springfield, Massachusetts. Ray can be credited with bringing "basket ball" to the state of Minnesota when he arrived in 1893 and for organizing the first game between two colleges. Two of Naismith's other students would later come to Minnesota and contribute to the growth of the sport in the state, future Carleton Athletic Director Max Exner and Louis Cooke future Gopher Basketball coach and Athletic Director.
The game on February 9, 1895 was played according to Naismith's original "peach basket" rules. There were 9 men on each team, and there was no running with the ball. Other oddities included actual peach baskets for hoops and the goalie position to keep scoring down. The game ended in a victory for the Agriculture school (Aggies). Three locations for the game have been reported: a barn, on a handball court, or the basement of the old science building. I suppose it could also have been some combination of those places. As you can see from the coverage it received the next day in the St. Paul Daily Globe, it hardly interested the locals at the time.
Hamline and the Aggies would go on to have a solid rivalry in these early years. The University of Minnesota would play both teams. The Gophers had trouble with the Aggies, playing 8 games between 1896-1901 and going 2-6. Meanwhile the U of M fared much better against the Hamline Porkers (Hamline would later change its nickname to the Pipers) at 5-0 all time. The U of M eventually solved it's problem with the Aggies by combining schools, and hasn't played Hamline since 1934.