We consider a model for heterogeneous gene regulatory networks that is a generalization of the model proposed by Chatterjee and Durrett (2011) as an annealed approximation of Kauffmanns (1969) random Boolean networks. In this model, genes are represented by the nodes of a random directed graph on n vertices with specified in-degree distribution (resp. out-degree distribution or joint distribution of in-degree and out-degree), and the expression bias (the expected fraction of 1s in the Boolean functions) p is same for all nodes. Following a standard practice in the physics literature, we use a discrete-time threshold contact process with parameter q=2p(1-p) (in which a vertex with at least one occupied input at time t will be occupied at time t+1 with probability q, and vacant otherwise) on the above random graph to approximate the dynamics of the Boolean network. We show that there is a parameter r (which can be written explicitly in terms of first few moments of the degree distribution) such that, with probability tending to 1 as n goes to infinity, if 2p(1-p)r>1, then starting from all occupied sites the threshold contact process maintains a positive ({it quasi-stationary}) density of occupied sites for time which is exponential in n, whereas if 2p(1-p)r<1, then the persistence time of the threshold contact process is at most logarithmic in n. These two phases correspond to the chaotic and ordered behavior of the gene networks.