Here's the approach stack:
dat2a <- data.frame(dat[1:2], stack(dat[3:ncol(dat)]))
dat2a
This is very similar to meltreshape2:
library(reshape2)
dat2b <- melt(dat, id.vars=1:2)
dat2b
# ID Time variable value
# 1 1 20 U1 1
# 2 2 20 U1 2
# 3 3 20 U1 2
# 4 1 20 U2 2
# 5 2 20 U2 5
# 6 3 20 U2 5
# 7 1 20 U3 3
# 8 2 20 U3 9
# 9 3 20 U3 6
# 10 1 20 U4 5
# 11 2 20 U4 4
# 12 3 20 U4 4
And, very similar to @ TylerRinker's answer, but without dropping the "times", just use sep = ""to help R guess the time and variable names.
dat3 <- reshape(dat, direction = "long", idvar=1:2,
varying=3:ncol(dat), sep = "", timevar="Measure")
dat3
, , . , @ndoogan, . , data.frame (, dat2a <- dat2a[-4].