Gold has behaved differently in past compared to current flattening of yield curve.

Timing gold forecast to yield curve is unreliable tool. But for long term it is an indicator can not be ignored.

Gold was in bull trend between 2003 to 2007-2008.
Since 2011 to current flattening gold has been just the opposite.

Forecast of recession is far away.

There are enough posts on the subject:

Should we worry about Yield Curve