I understand from the comments in this link that currently it is not possible to get a legend for a list of layers.
Gadfly is based on Hadley Wickhams's ggplot2 for R and thus the usual pattern is to arrange data into a DataFrame with a discrete column for labelling purposes. In your case, this approach would look like:
x = 1:10
df1 = DataFrame(x=x, y=2x, label="double")
df2 = DataFrame(x=x, y=x.^2, label="square")
df3 = DataFrame(x=x, y=1./x, label="inverse")
df = vcat(df1, df2, df3)
p = plot(df, x="x", y="y", color="label", Geom.line,
Scale.discrete_color_manual("blue","red", "green"))
draw(PNG("stock.png", 6inch, 3inch), p)